system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How does the body know when to wake up from sleeping?
gpt
We are all subject to a circadian rhythm which dictates our sleep timings. A couple of factors include exposure to light and our body's release of supplement called melatonin. 

Many babies, for example, are naturally nocturnal. That is why parents have to sleep train them. After that, they will typically get tired and wake up around the same times each day. 

Of course, this circadian rhythm varies depending on the person.

This is also why when you wake up naturally, (as opposed to alarms or other noises) you often feel more rested, no matter how much or little sleep you got.