How Does Sleep Work?

Disclosure: By clicking on the product links in this article, Mattress Nerd may receive a commission fee at no cost to you, the reader. Read full disclosure statement.

Sleep is when you give your body and mind the rest it deserves, but your brain and bodily systems are far from inactive. While you sleep, distinctive sleep stages alter brain activity, hormone production, and other body systems that help you stay sharp and healthy. Let’s look at how sleep works and how it affects your body. 

What Happens When You Sleep

While sleeping, your body settles into its sleep cycle with four stages: N1, N2, N3, and rapid eye movement (REM). The N1, N2, and N3 stages are all non-rapid eye movement (NREM) sleep. Each stage of sleep alters brain waves, heart rate, muscle tone, eye movements, and breathing in different ways. 

Your body cycles through these sleep stages four to six times, each lasting about 90 to 110 minutes. After the first cycle, the order changes to N1, N2, N3, N2, REM. The REM stage increases as sleep progresses, and you spend less time in deep sleep (N3).  

Sleep stages

Stage 1: N1 (Light Sleep)

Time: 1 to 5 minutes (5% of sleep cycle)

The first stage of NRM sleep is where the lightest sleep occurs, and brain activity starts to slow down. During N1, low-amplitude mixed-frequency (LAMF) activity replaces half of your brain’s alpha waves to decrease brain activity to help you fall asleep. The body isn’t fully relaxed at this stage, and breathing is regular. Each N1 stage lasts about 1 to 5 minutes, and you will likely spend less time in this phase if your sleep is uninterrupted. 

Stage 2: N2 (Deeper Sleep)

Time: 25+ minutes (45% of sleep cycle) 

During N2, your heart rate and temperature drop to help you enter a deeper sleep. Your muscles also start to relax, and your breathing slows. Your brain activity continues to slow down with long delta brain waves, but you’ll also experience sleep spindles. Sleep spindles are quick bursts of brain activity that help keep the outside world from waking you up. They also help your brain process, store, and recall memories. K-complexes are long delta brain waves that help you stay asleep and consolidate memories. 

The first N2 stage lasts about 25 minutes and then increases each cycle. You’ll spend the majority of your time snoozing in this stage. If you grind your teeth at night, it happens during N2. 

Stage 3: N3 (Deep Sleep)

Time: 20-40 minutes (25% of sleep cycle) 

N3 is the deepest stage of sleep, also known as slow-wave sleep (SWS). During deep sleep, delta waves slow brain activity, and your breathing and heart rate are at their slowest levels. 

While slow, brain activity is still active and helps improve short-term and long-term memory needed for learning. This stage of max relaxation is also when your body builds muscle and bone, strengthens the immune system, and repairs and grows tissues. 

It is difficult to wake up at this stage, even with loud noises. However, if you are woken up in N3, you’ll feel foggy and disoriented (aka sleep inertia). N3 is also when people experience night terrors, sleepwalking, and bedwetting. Deep sleep lasts about 20 to 40 minutes, and you’ll spend less time in N3 and more time in REM as the night progresses. 

Stage 4: Rapid Eye Movement (REM)

Time: 10 minutes to 1 hour (25% of sleep cycle)   

REM sleep is the least restful stage and initially starts about 90 minutes after falling asleep. Brain activity is at its highest in REM sleep and includes more beta waves—which are similar to someone’s brain activity while awake. This is important for learning, memory, brain function, and mood. REM is also the sleep stage where people experience dreaming, nightmares, REM sleep behavior disorder, and spontaneous sexual arousal.  

During this stage, your body still lacks muscle tone, but your eyes rapidly move back and forth under your eyelids. Your breathing speeds up and becomes irregular while your heart rate and blood pressure increase to levels close to being awake.

REM stages increase as you sleep, with the first stage lasting about 10 minutes and the final stage lasting 1 hour. 

How Your Body Knows When to Sleep

Your body knows when it’s time to sleep thanks to two internal biological systems: circadian rhythm and homeostasis. 

Your circadian rhythm is your 24-hour sleep/wake cycle—or biological clock. This system releases hormones and changes your body temperature in sync with daytime and nighttime. When it gets dark, the lack of sunlight tells your body to prepare for sleep by lowering your body temperature and telling your pineal gland to release melatonin. This sleep hormone helps you feel tired so you’re ready to sleep. 

Homeostasis is your body’s internal regulation system that keeps various body systems in sync and working correctly. Sleep-wake homeostasis is your body’s internal mechanism for tracking when it’s time to sleep. When you feel that tug that it’s time to rest, that’s your homeostatic sleep drive telling you to sleep. This sleep drive becomes more intense the longer your awake.  

What Does Sleep Do for Your Body?

Sleeping keeps your body healthy by supporting the circulatory system, immune system, hormone production, and metabolism. 

While you sleep, your blood pressure and heart rate fall during NREM sleep and increase during REM sleep. This change in blood pressure and heart rate helps keep your circulatory system healthy, and people who don’t get enough sleep are at an increased risk of coronary heart disease, high blood pressure, and stroke. Cortisol levels also lower while you sleep. This stress hormone regulates your body’s stress response, blood sugar, blood pressure, cardiovascular system, and energy.  

During NREM and REM sleep, different immune cells work to stabilize your immune system so you can better fight illness. Your metabolism is also closely intertwined with rest. Sleep helps regulate hunger hormones that help control appetite, fat storage, and metabolism.  

Additionally, human growth hormone (HGH) levels increase while you sleep—primarily in deep sleep. HGH helps regulate muscle development, bone development, immune system health, and metabolism. 

What to Do if You’re Having Trouble Sleeping

If you’re struggling to fall asleep or get enough sleep, try these tips to improve your sleep habits.

  • Keep a consistent bedtime. Stick to a nightly bedtime that gets you 7-8 hours of sleep and helps keep your circadian rhythm and sleep homeostasis happy. 
  • Make your bedroom dark. Lights inside or outside the bedroom can affect your circadian rhythm and keep you up. Try blackout curtains or shades to keep the light out.
  • Keep your bedroom quiet. If nighttime noise disrupts your sleep, try soothing ambient noise from a fan or white noise machine
  • Cool down your bedroom. Lowering the thermostat to 65–70°F can help regulate your sleep temperature for a better snooze. 
  • Avoid electronics before bed. Blue light from electronics can lower melatonin levels, altering your circadian rhythm and making you feel awake.   
  • Avoid eating before bed. Eating before bed can cause uncomfortable indigestion that makes it tough to sleep. 
  • Limit caffeine. To avoid the lingering energy boost, stop drinking caffeine about 6 hours before bedtime and keep your daily limit to 400 milligrams (about 5 cups of coffee).  
  • Avoid alcohol before bed. Drinking alcohol can alter your sleep cycles, which leads to low-quality sleep. Additionally, heavy drinking may lead to insomnia. 
  • Stop smoking. Smoking increases your risk of snoring and sleep apnea, making it difficult to get enough quality sleep. 
  • Move your body regularly. Daily exercise can help keep your circadian rhythm in check and trigger the release of melatonin that helps you sleep at night.  
  • Take care of your mental health. Stress can suppress melatonin and lead to sleep issues, while anxiety and depression are linked to insomnia.  

Talk to your healthcare provider if you continue to have issues falling or staying asleep. You may have an underlying condition or sleep disorder that needs additional treatment. 


Your body needs sleep to keep your brain and body healthy and functioning. While you sleep, you’ll enter four sleep stages: N1, N2, N3, N2, REM. During these stages, you’ll move in and out of deep sleep, and your brain waves, heart rate, breathing, muscle tone, and eye movements change. These changes help regulate your circulatory system, immune system, hormone production, and metabolism. A good night’s sleep also prepares your mind to process and store memories. 

Source List