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 System | Hormones | Organs & Muscles | Sleep Cycles | Other Crazy Things That Happen | Bottom Line | FAQs | 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
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.
โ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.โ
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
Have 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.โ
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

Do The Moonโs Cycles Actually Influence Your Sleep?

What Is Biphasic Sleep?

What Is REM Sleep?
Weird Things People Do In Their Sleep
A number of unexpected things can happen while sleeping. These include:
Snoring
The 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.
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?

How Genetics Impact Our Sleep

Why Are Yawns Contagious?

