system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: What happens to make an entire night pass in the blink of an eye?

On numerous occasions, I will go to bed at night, close my eyes, and then open them again and BA-BAM, it's daytime. My brain says two seconds have passed and I feel like I got no sleep at all. This is commonly referenced both online and in stories. How does it work?
gpt
Others are coming with correct responses but are not actually getting to the core of what your asking.

When you get enough sleep, you feel as though time has passed, because part of getting enough REM sleep cycles per night, your brain will records some fragments of memories and/or dreams.  That's why you sometimes remember parts of a dream, or have an instinct to know that you were rolling around.  Usually not with a high detail, but enough for your brain to at least keep track of time passing.

If you fall asleep and feel like you woke up a moment later, but hours DID in fact pass, it's a sign that you're probably not getting a deep enough / long enough sleep for your brain to do the multiple REM cycles it needs each night.  You might be getting zero or one REM cycle in max before you're woken up.