Looking from the outside, sleep seems to be the most passive thing you can do. Your eyes are closed and you physically can’t do anything. In reality, though, there is a lot more going on behind your eyelids than first meets the eye.

How sleep works
Sleep is an incredibly complex process. Several brain structures need to work together in symphony for you to reach your optimal sleep state, including your basal forebrain, midbrain, amygdala, pineal gland, thalamus, cerebral cortex, brain stem…the list goes on! You can only be lulled to sleep if each structure in your brain plays its part just right. 

During the night, you cycle through four stages of sleep. Almost like drifting up and down on a slow wave, you drift from light sleep to deep sleep to dream-sleep and back again. These cycles between light, deep and dream sleep usually happen in 90 minute intervals, which means you will go through 4 or 5 of these cycles on a good night (6-9 hours of sleep).

The first three stages of sleep are called non-rapid eye movement (non-REM) sleep, and the fourth stage is called rapid eye movement sleep (REM). 

Time for drift-off!
During the first few minutes of falling asleep, your heart rate, eye movements and breathing slows down and your muscles relax, with a few muscle-twitches as your system starts shutting down. This is stage 1 of non-REM sleep. 

Going deeper, captain…
This stage of sleep makes up most of a full night’s rest. It is the period of light sleep, before you go into deep sleep. Your breathing and heart rate slow down, and your muscles relax even more. Your eye movement stops and your body temperature drops.

During this stage of sleep, your memory is consolidated, and any extra brain cells are pruned away, to make a more efficient brain. It’s basically your brain’s time to clean up and organize everything. This is Stage 2 non-REM sleep.

We’ve hit the bottom!
This is the sweet spot. If you reach this stage of sleep, you will feel refreshed in the morning. During this stage, your breathing, brain waves and heartbeat slow to their lowest levels and your muscles relax fully. When someone is in this stage of sleep, it’s hard to wake them up. This is stage 3 non-REM sleep

Off to dreamland! 
You will reach your first dream stage about 90 minutes after you fall asleep. Your brain waves look more similar to when you are awake, your breathing becomes faster and your heart rate and blood pressure increase. This is the time when most of your dreams occur. The only reason you don’t act out your dreams, is because your systems switches off the muscles of your arms and legs. 

This is called the Rapid Eye Movement (REM) stage, because your eyes rapidly move from side to side behind closed eyelids.

You can’t try to sleep better
Anyone who has struggled with sleeping will know how frustrating it can be! The harder you try, the more awake you feel. We can only improve the quality of our sleep indirectly. It’s a bit like tending a plant: you can’t make the plant grow by pulling and pushing it. You can only create the optimal environment, and the plant will grow by itself.

In the same way, you can’t actively make yourself sleep, you can only create the optimal circumstances and sleep will simply “happen to you”.

Here are some ingredients to help set you up for a good night’s rest: 
• Get a good dose of bright light exposure in the day. This will help your circadian rhythms, which are hormonal cycles in your body that help you fall asleep.
• Get rid of blue lights in the evening. This means no phone, no computer, no television – switch off your electronic devices, so your brain can start getting ready for bed.
• No caffeine after 3pm. Yes, 3pm. Caffeine can stay in your blood for 6 to 8 hours, which means it will take you that much longer to fall asleep.
• Make sure you have a quiet, dark, cool space to sleep. If possible, try to set your room temperature to 20ºC. One study found that a cool room can be more important than a quiet one to help with a good night’s sleep.
• Routine, routine, routine. One thing about the brain is that it loves routine. So the better you structure your time to get to bed and stay in bed, the more likely that your mind will start shutting down at the same time each night.

References:
https://www.tuck.com/stages/
https://www.ncbi.nlm.nih.gov/pubmed/1811316
https://www.ninds.nih.gov/Disorders/Patient-Caregiver-Education/Understanding-Sleep