When you wake up in the middle of the night and go back to sleep, do you start a new sleep cycle or do you continue where you left off your last sleep cycle at? In other words, do you start back at stage 1 sleep or continue sleeping in the stage you were in?

Also, would it depend on how long you were awake? Would there be a difference between being awake for a few seconds as opposed to waking and walking around for 5 minutes?