system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: What happens in your body over the time when you close your eyes to when you are actually sleeping and the process in between? What in your body triggers you to fall asleep?
gpt
It is still not fully understood, but research has shown that it is more gradual, and less like "asleep or awake".

In the first stage of falling asleep, after the lights are off and your eyes closed, your brain gradually shifts to what is called alpha activity. In this period you slowly start going back and forth between external thoughts and internal thoughts.

In the next stage, considered the first phase of sleep, your brain waves start slowing down and enter into theta-activity. These will have brief flares of alpha activity that give you the sense that you're still awake. Specialists do not necessarily agree that you are asleep at this stage, but some say you are.

From this stage you enter non-rem sleep, this is the point when all alpha activity stops. At this stage, all scientists seem to agree that you are actually asleep. If woken from this stage, though, you may think you have not slept. In a poll done from waking people from this stage, 40% of people thought they had not slept. 

From this stage your brain enters into stage 3 of sleep: delta activity, or slow wave sleep. Then finally stage 4 where you experience REM and are in full deep sleep. Most people awoken from stage 3 or 4 realize that they were asleep.

You then will cycle between stage 2, 3 and 4 throughout the night. When you are awoken in stage 4, this is when you wake up feeling incredibly groggy and disoriented. If you wake up in stage 2, you will feel more "immediately awake". Stage 3 is somewhere in between.