Sometimes, I wake up suddenly. It could be in the midst of a dream. It could be at the end of a dream. Usually, I was muttering a word or some words and woke myself up, from the force of speaking the same words repeatedly. The body clock has a way of knowing when to wake up at its regular pattern. So when the sleep cycle is ending, the body will wake up, even if a dream was unfinished.