I had dozed off during the afternoon. At the end of the nap, I started dreaming. I nearly woke up, but I was in that strange state of limbo when you know that you're awake, but still don't have control over your muscles - the time when your mind is awake, but your body is asleep - when the brain has re-awakened the thinking parts of the brain, but not the body-control mechanisms. When this happens, I usually "test out" all my muscles, and I keep repeatedly moving those that have come under my control, so that that repeated action causes enough stimulus for the brain to wake up the rest of the body, so that I can actually get up.
There was a time when I tried doing this, and got up.
Then, a minute later, I realised that I wasn't actually awake, I was still in limbo, and still dreaming. It only appeared real because within the dream, I got up in exactly the same place, and in the same position, in which I had gone to sleep.
So I tried a second time, and I got up.
And the same thing happened a second time - I realised that the entire "getting up out of the bed" thing was a part of the dream.
So I tried a third time - and this time, finally, it worked.