How Sleep Works: What Happens to Your Body When You Sleep?

We receive free products to review and participate in affiliate programs. See our disclosure page for more information.

There are so many things to consider when it comes to getting good sleep, from sticking to a regular bedtime and wakeup time, to creating a relaxing sleep environment with a comfortable mattress. Another major factor in successful sleep? What happens to your body while you sleep.

Want to learn more about all things sleep science from what happens to your body when you sleep to if yawning is contagious? Keep reading to understand the ways in which sleep affects our lives!

Jump To

The Brain | Immune SystemHormones | Organs & Muscles | Sleep Cycles | Other Crazy Things That Happen | Bottom LineFAQs | Learn More about How Sleep Works

How Sleep Works

When falling asleep at night, it might feel like your brain and body are “shutting down” for a few hours. However, a variety of complex things happen in your body when you’re asleep — both obvious and not-so-obvious. Yes, you’re dreaming (which you may or may not remember) and snoring lightly or… not so lightly. But you are also consolidating memories, repairing muscles and cells, and so much more.

While you sleep, your body moves through different sleep stages: Non-REM sleep (NREM) and rapid eye movement sleep (REM). You spend roughly 75%–80% of your sleeping time in NREM sleep, which is sometimes also called slow-wave sleep (SWS) in deep sleep.

RELATED: The Complete Guide to Your Sleep Cycle

sleep stages play a role in our body's functions

The National Institute of Neurological Disorders and Stroke describes the different sleep stages as follows:

  • Stage 1 sleep: A relatively light stage, and it’s fairly easy to be woken up.
  • Stage 2 sleep: Body temperature drops, and breathing and heart rate begins to slow.
  • Stage 3 sleep: Described as the “deepest and most restorative sleep.” During this stage, blood pressure drops, muscles relax, breathing slows down and hormones are released.
  • Stage 4 sleep: First happens about 90 minutes after falling asleep and you reach REM sleep.

REM sleep is characterized by your eyes moving back and forth — hence the name, rapid eye movement. During REM sleep, your breathing speeds up and becomes irregular, and dreaming can occur as your brain is extremely active.

“Signals are sent to the brain’s cerebral cortex, which is responsible for learning, thinking, and organizing information,” the National Institutes of Health (NIH) explains. “Signals are also sent to the spinal cord to shut off movement, creating a temporary inability to move the muscles (‘paralysis’) in the arms and legs.”

After a period of REM sleep, one full sleep cycle is complete and Stage 1 sleep starts again.

In each of these stages, different things happen in your brain and muscles. Plus, your hormones and nervous system are active throughout the night. This piece will cover what’s going on in various parts of your body while you are sleeping, from brain activity to muscle repair, the functions of different organs, and more.

The Brain

As you can imagine, a lot is going on inside the brain during sleep — and not just when you are dreaming. According to the NIH, different sleep stages are associated with different brain wave activity. Your brain waves slow down through Stage 1 and Stage 2, reaching their slowest point in the deep Stage 3 sleep.

But when you reach REM sleep, your brain activity “becomes closer to that seen in wakefulness.” And some people do actually “act out” their REM dreams, physically moving their bodies around while they sleep.brain activity during sleep

“We do know that a small group of cells in the brain stem, called the subcoeruleus nucleus, controls REM sleep,” a Scientific American article explains. “When these cells become injured or diseased, people do not experience the muscle paralysis associated with REM sleep, which can lead to REM sleep behavior disorder—a serious condition in which the afflicted violently act out their dreams.”

Memories

Sleep is also linked to memory consolidation. Learning and memory occur in three steps: 

  • Acquisition: Introducing new information to the brain 
  • Consolidation: Making a memory stable
  • Recall: The ability to access the information or memory after it has been introduced and stabilized

How well-rested you are can affect your acquisition and consolidation before learning, too. “We’ve learned that sleep before learning helps prepare your brain for the initial formation of memories,” Dr. Matthew Walker, a sleep scientist at the University of California, Berkeley, told the NIH’s News In Health. “And then, sleep after learning is essential to help save and cement that new information into the architecture of the brain, meaning that you’re less likely to forget it.”

Body Temperature Regulation

The brain also helps regulate body temperature during sleep, via an area called the hypothalamus. According to MedLine Plus, the hypothalamus helps regulate temperature along with appetite, sex drive, and the sleep-wake cycle (also called your Circadian Rhythm). Your body temperature starts to lower in Stage 2 sleep, thanks to cues from your brain.

The Neuroscience Research published research in 2017 that further explains the relationship between the hypothalamus and your sleep-wake cycle. The paper identifies two types of neurons in the hypothalamus, one type “a crucial component for maintenance of wakefulness” and the second “implicated in the regulation of sleep/wakefulness.”

Dreaming

And, of course, your brain is involved in dreaming. No one can say for sure exactly why we dream or what the purpose of dreaming is, but some research says that dreaming is linked to memory consolidation.

According to research, analyzing brain waves can reveal whether or not someone is dreaming. “The researchers found that, when the participants were dreaming, they showed a decrease in low-frequency brain waves, and an increase in high-frequency brain waves, in the posterior hot zone, compared with when they weren’t dreaming. They found this pattern regardless of whether the participants were dreaming during REM or non-REM sleep.”

Hormones

One major hormone involved with sleep is melatonin. The University of Rochester Medical Center website explains that melatonin is a hormone made by the pineal gland, and melatonin secretion is controlled by light exposure.

Research published in the British Journal of Pharmacology in 2018 on the relationship between melatonin and the circadian body clock says that the “light‐inhibited production of melatonin conveys the message of darkness to the clock and induces night‐state physiological functions, for example, sleep/wake blood pressure and metabolism.”
hormones and sleep are connected

The relationship between melatonin and light is the reasoning behind many common sleep hygiene recommendations. For example, have you ever been told to avoid looking at electronic screens that emit blue light for at least an hour before bed? That’s because that type of light can interfere with melatonin secretion, making it more difficult for you to fall asleep. Many devices now offer “night mode” to address this issue, but it’s still ideal to ditch your phone, tablet, or TV for a book or audiobook when you are winding down before bed.

Knowing about melatonin secretion and light can also help you tackle jet lag and daytime sleepiness. If you find yourself incredibly tired during the day, because of jet lag or for whatever other reason, a short walk in the sunshine helps remind your body that it’s daytime and keeps you awake. Similarly, when you do go to bed, keeping your room as dark as possible helps cue melatonin to help you drift off.

According to the National Library of Medicine, cortisol, a hormone released in response to stress, is linked to sleep as well. Research suggests that sleep deprivation is linked to higher cortisol levels — associating sleep deprivation with “immune compromise, cognitive impairment, and metabolic disruption,” the Dartmouth Undergraduate Journal of Science says.

Immune System

sleep deprivation negatively impacts the immune systemHave you ever heard that a lack of sleep can cause you to get sick? It turns out that it may not be a myth. “Studies show that people who don’t get quality sleep or enough sleep are more likely to get sick after being exposed to a virus, such as a common cold virus,” the Mayo Clinic says. “Lack of sleep can also affect how fast you recover if you do get sick.”

Harvard Health explains it like this: “Sleep deprivation increases the levels of many inflammatory mediators, and infections, in turn, affect the amount and patterns of sleep. While scientists are just beginning to understand these interactions, early work suggests that sleep deprivation may decrease the ability to resist infection.”

If you are immunocompromised or going through something that affects your immune system, such as chemotherapy, experts say you should try to prioritize sleep. “Getting an adequate amount of sleep is an essential requirement for good health,” the Immune Deficiency Foundation says. “Most scientists recommend a consistent number of hours of sleep per night and consistent bed times and waking times, as well.”

If you find yourself sick with a cold or stomach bug, sleep is essential to recovery. “Getting plenty of rest is arguably the most important strategy when it comes to bouncing back from an illness,” the American College of Healthcare Sciences says. “Aim to add at least an extra hour to your normal sleep time whenever you feel illness creeping in, either by going to bed earlier or sleeping in later (or ideally both). If possible, sneak in a few small naps during the day to give your body a break and provide it with additional opportunities for rejuvenation.”

Organs & Muscles

Have you ever been drifting into sleep, only to experience a whole-body jolt that shakes you awake? This is called a hypnagogic jerk or a “sleep start,” and it’s a type of muscle spasm. These are totally normal, though experts aren’t totally sure what causes them. “Persons with sleep myoclonus (the sudden jerking motion you can’t control) are rarely troubled by, or need treatment for, the condition,” the Baylor College of Medicine website explains. “However, myoclonus may be a symptom in more complex and disturbing sleep disorders, such as restless legs syndrome, and may require treatment by a doctor.”organs and muscles are still working during sleep

Sleep is important for muscle growth and muscle repair. You need sleep to recover from strength training and to build more muscle. Sleep is also crucial for athletic performance, reducing injury risks and improving speed, accuracy, and stamina.

During rapid eye movement (REM) sleep, your muscles are completely paralyzed. Even though your eyes are closed while you are asleep, your eyes do move around (behind your eyelids) during REM sleep. One theory is that each eye movement is associated with a new “vision” or physical scene in your dream.

Plus, some people do actually sleep with their eyes open — the American Academy of Ophthalmology says this can be caused by eyelid problems or issues with the facial nerves: “In most cases, the lids will close most of the way but not completely. Even a small opening in the eyelids can dry out the eyes overnight.” If you wake up with eye dryness, red eyes, blurry vision, or feeling like something is stuck in your eye, you might be sleeping with your eyes partly open.

While sleeping, your major organs continue to function as they normally would. Let’s go over how certain organs act when you sleep.

Heart

Your heart rate can drop to quite a low level during deep sleep, the American Heart Association says, but it continues to pump blood around your body while you are resting. However, things can speed up during REM sleep.

“Your blood pressure and heart rate can go up and down during this stage,” the UCLA Health website says. “If you have a nightmare that wakes you up, you may find that your heart is racing.” If you wear a smartwatch or heart monitoring device while you sleep, you may notice what heart rate patterns seem normal for you throughout the course of the night.

Kidneys

Your kidneys continue to filter your blood and create urine. “Kidney function is actually regulated by the sleep-wake cycle. It helps coordinate the kidneys’ workload over 24 hours,” Dr. Ciaran McMullan, M.D., told the National Kidney Foundation. “We also know that nocturnal patterns can affect chronic kidney disease and that people who sleep less usually have faster kidney function decline. What we’re doing now is looking at the specific hormones that may be behind these declines.”

Lungs

Your lungs keep you breathing while you sleep in order to keep blood oxygen levels steady, but some people suffer from breathing conditions during sleep. One example is sleep apnea, explained a little bit more in the next section. Another is a chronic obstructive pulmonary disease (COPD). Cleveland Clinic says COPD is a term applied to a family of diseases that includes emphysema, chronic bronchitis, and emphysema due to alpha-1 antitrypsin deficiency. 

In an article for the Cleveland Clinic, Pulmonologist Dr. Amy Attaway was interviewed saying “many people living with chronic obstructive pulmonary disease, or COPD, are in a hypermetabolic state. Your body feels like it’s spending all of its energy on breathing.”

More Sleep Cycle Resources

Common Reasons People Wake Up In The Middle Of The Night

Common Reasons People Wake Up In The Middle Of The Night

Picture this: You settle down for the night at 10 pm. As you hop into bed, you think of how refreshed you’ll feel in the morning after a full eight hours of sleep. But when you wake up, you realize it’s still pitch dark—and when you check the clock, you see it’s 3 am. If … Read more
Read More
Do The Moon’s Cycles Actually Influence Your Sleep?

Do The Moon’s Cycles Actually Influence Your Sleep?

Many myths and legends suggest the phase of the moon can affect behaviors. Folklore about werewolves even suggests it can have transformative powers. Though we may not change species according to the moon cycles, there is research to suggest they do affect us. This poses the question: Do lunar cycles affect how you sleep? To … Read more
Read More
What Is Biphasic Sleep?

What Is Biphasic Sleep?

If you’re in the habit of taking a nap during the day and sleeping normally at night, your sleeping pattern is known as biphasic sleep. This sleep habit involves two sleep segments in a 24-hour window. Here’s what else to understand about biphasic sleep and whether it might be beneficial. How Does Biphasic Sleep Work? … Read more
Read More
What Is REM Sleep?

What Is REM Sleep?

Sleep can be a mystery, especially if you struggle to get more of it. You may consider sleep as one single stage where your body and mind rest and rejuvenate. But sleep is a more nuanced process that includes different stages, each with unique benefits for your well-being.  Understanding REM Sleep  When you’re sleeping, your … Read more
Read More

Weird Things People Do In Their Sleep

A number of unexpected things can happen while sleeping. These include:

Snoring

snoring may be a sign of sleep apneaThe Mayo Clinic explains that snoring happens when “air flows past relaxed tissues in your throat, causing the tissues to vibrate as you breathe.” A few factors play into this, including the anatomy of your mouth and throat, alcohol consumption, your sleep position, and nasal passage issues. If you find that snoring is waking you up at night or disturbing your partner, you can try sleeping on your side or speaking with a doctor to see if the snoring is associated with obstructive sleep apnea (OSA).

Sleepwalking

Getting out of bed at night and moving around while completely asleep doesn’t just happen in cartoons. In fact, research suggests that sleepwalking is less rare than you might think — it affects around 2%–4% of adults and 15% of children.

If you are prone to sleepwalking or live with someone who sleepwalks, there are potential safety risks like falling or accidental injuries. Speak with a doctor about how to treat sleepwalking or make your home a safer place for sleepwalkers.

Sleep Eating

Believe it or not, you can eat while you’re asleep, and it has a name. Nocturnal sleep-related eating disorder (NS-RED) is the act of chomping down on a midnight snack while not being fully aware that you’re doing so. This typically happens with sleep walking, and could mess with nutrition plans, cause shame, and unintentional weight gain.

Researchers aren’t entirely sure why or how sleep eating happens, but as mentioned, it is commonly associated with sleepwalking and restless leg syndrome.

Sleep Talking

It is common for some people to talk while they sleep, too. Most people don’t remember saying anything, and for some, they may not know they do it until they have someone else in the room with them. Sometimes the words might be gibberish, or they might be having a full blown conversation. Sleep talking could just be a response to dreams, though ultimately, the cause is uncertain. All this to say, however, it shouldn’t be something to be concerned about.

Sleep Texting

The digital age has changed the way many of us go about our days and nights, and many of us rely on our cell phones for just about anything. Because it’s common to have phones act as an alarm clock, many of us have the phone within reaching distance when we climb into bed. Because of this, some of us may wake up in the morning and find that we sent off some texts that we were not aware of because we were asleep.

RELATED: Is Sleep Texting a Thing?

Bottom Line

While you might feel like sleep is idle time, that’s actually far from the truth. During sleep, your body is working hard to move oxygen through your body, repair cells, grow and repair muscles, filter your blood, and more.

There are plenty of things happening during sleep that we still don’t totally understand, particularly when it comes to brain activity or dreaming. That said, If you are worried about anything that’s happening while you sleep, you can speak with your doctor about what might be happening and how best to address it. For example, if you consistently wake up experiencing physical discomforts like dry eyes or a sore throat, that may be worth chatting to a medical professional about.keep a sleep diary to help track your sleep

If you want to gather more information about your sleep habits, one good first step is to keep a sleep diary. This can be done in a notebook, using an app, or on a spreadsheet — whatever works best for you. For a few weeks, track what time you go to bed and what time you wake up, and how well you slept. Consider tracking other relevant information like what time you ate dinner, the latest point in the day you consumed caffeine, late-night snacks, whether you used electronics before bed, how stressed you felt that day, whether you took a nap at any point and anything else you can think of.

Once you have data from a few days or a few weeks, you can look for any patterns — do you toss and turn after eating a heavy meal, or get up to go to the bathroom multiple times per night after consuming alcohol? Knowing your personal patterns can help you decide what changes to make to improve your sleep quality.

As a first step for improving any sleep issues, most physicians will recommend adopting a rigorous sleep hygiene routine. Sleep hygiene is a set of habits that help you drift off quickly and make it more likely that you will routinely get high-quality sleep. Recommended sleep hygiene steps include:

  • Avoiding alcohol, caffeine, and heavy meals or heavy snacking close to bedtime
  • Avoiding blue light emitted by electronics like phones, tablets, TVs, or computers before at least one hour before bedtime
  • Going to bed at the same time every night
  • Waking up at the same time every morning — even on weekends
  • Establishing a bedtime routine that helps you relax and wind down, like listening to music, reading, stretching, or sipping a cup of herbal tea
  • Using your bed for sleep or sex only
  • Keeping your bedroom cool, dark, and as quiet as possible (using blackout shades, an eye mask, earplugs, white noise, or a fan as needed)
  • Getting regular exercise, ideally earlier in the day so you feel tired at night
  • Managing any sources of constant stress or anxiety, so you don’t lie awake worrying when you are trying to go to sleep
  • Getting out of bed to read or listen to music once you have laid in bed awake for 20 minutes, and returning to bed once you feel tired again

You can find more sleep hygiene recommendations online, or by speaking with a physician or a certified sleep coach.

FAQs

Are You Sleeping Too Much?

The Centers for Disease Control and Prevention (CDC) recommends that young adults get 8 to 10 hours of sleep each night and adults get 7 hours or more per night. But what happens for people who regularly sleep a lot longer than that?

Learn more about what happens when you get too much sleep here!

Can You Catch Up on Sleep Over the Weekend?

Ever heard of “sleep debt?” Scientific American describes it as “the difference between the amount of sleep you should be getting and the amount you actually get. It’s a deficit that grows every time we skim some extra minutes off our nightly slumber.” And paying off that sleep debt isn’t as simple as sleeping extra hours on the weekend.

Learn more about sleep debt here!

Does Counting Sheep Really Help You Go to Sleep?

One thing’s for certain: The idea of counting sheep before bed has been around for a long time. But that doesn’t mean it’s a tried and true method for dozing off faster. In fact, research suggests that counting sheep isn’t actually an effective way to make yourself fall asleep.

Learn more about the science of sheep counting here!

How Does Lack of Sleep Affect Your Mood?

Sleep deprivation undoubtedly affects one’s mood. When people haven’t gotten enough sleep, they may well find themselves feeling grumpy, irritable, sluggish, and generally ill-tempered. Lack of sleep has also been linked to anxiety and even depression.

Learn more about how sleep affects your mood here!

What Are the Benefits of Getting More Sleep?

Here’s a tidbit for you: We spend almost one-third of our lives sleeping. This is a huge chunk of our lives, and it is a time when our body can rest, recharge, and recover. It is recommended that adults get between seven and eight hours per night. However, many people get less than six hours a night.

Learn more about the benefits of getting more sleep here!

What Would Happen if You Didn’t Sleep?

What happens if you don’t sleep? More precisely, what happens to our minds and our bodies when we decide not to sleep? Our research tells us that it’s far from healthy to deny our bodies much-needed sleep.

Learn more about what would happen if you didn’t sleep here!

Learn More about How Sleep Works

Early Birds vs Night Owls – Is One Better Than The Other?

Early Birds vs Night Owls – Is One Better Than The Other?

Some people wake up bright and early, ready to tackle the day. Others find their stride later in the evening. These are two common sleep chronotypes, or specific patterns of sleep, that we see play out in our daily lives. Many people know why these differences between individuals occur. When it comes to early birds … Read more
Read More
How Genetics Impact Our Sleep

How Genetics Impact Our Sleep

Sleep is something all humans need, and yet, so much about it remains a mystery. Scientists have established the basics—that there are multiple sleep stages, and that one stage, REM sleep, is associated with learning and storing memories. However, the exact mechanisms behind sleep and dreaming are still unclear. Research suggests that behavioral sleep habits … Read more
Read More
Why Are Yawns Contagious?

Why Are Yawns Contagious?

You likely know the feeling of a yawn coming on. Seemingly outside of your control, your mouth opens wide, your jaw drops, and you inhale deeply through your mouth and nose, followed by a shorter exhale. Maybe you stretch out your arms and legs and close your eyes tightly as your yawn peaks. You may … Read more
Read More
Sleep Survival Across America

Sleep Survival Across America

Feeling tired? Worn down?  Welcome to the club – an increasing number of Americans are getting less sleep than they need each night. The impact of poor sleep can impact our personal health and increase the chances of safety issues across all 50 states. Let’s take a look at why Americans are so tired and … Read more
Read More