provider image
Welcome! You’re in GoodRx for healthcare professionals. Now, you’ll enjoy a streamlined experience created specifically for healthcare professionals.
Skip to main content
HomeWell-beingSleep

What Causes Sleepwalking? A Look At Why It Happens, and What You Can Do About It

Anne Jacobson, MD, MPHKatie E. Golden, MD
Updated on May 24, 2023

Key takeaways:

  • Sleepwalking is a type of parasomnia, which consists of behaviors that happen in a stage of deep, nondreaming sleep.

  • Sleepwalking occurs when someone is partially aroused out of a specific phase of sleep. Many conditions that disrupt sleep are risk factors for sleepwalking.

  • Sleepwalking is more common in children, and most of them will naturally grow out of it. Treating underlying sleep disorders, like sleep apnea and restless leg syndrome, can also help to manage sleepwalking.

Cropped image of someone's feet walking indoors at night.
eugenekeebler/iStock via Getty Images Plus

Centuries ago, sleepwalkers were thought to have mystical powers. Some believed that wicked forces were at play. In great works of literature and music, famous characters have walked and talked in their sleep. Sometimes it even comes up in crime investigations. Needless to say, there’s a lot of mystery that surrounds sleepwalking.

If you know someone who walks in their sleep, or if you’ve done it yourself, you may have wondered how and why it happens. Even with our modern understanding of the science behind it, sleepwalking holds a curious fascination. What’s going on when you sleepwalk? And why does it only happen to some people?

What is sleepwalking (somnambulism)?

Sleepwalking, or somnambulism, is a type of parasomnia. A parasomnia is a behavior that doesn’t happen during normal sleep. Someone who sleepwalks has been partially aroused from a state of deep, nondreaming sleep. They walk around — and sometimes do other activities — in this state of disturbed sleep.

Search and compare options

Search is powered by a third party. By clicking a topic in the advertisement above, you agree that you will visit a landing page with search results generated by a third party, and that your personal identifiers and engagement on this page and the landing page may be shared with such third party. GoodRx may receive compensation in relation to your search.

Other types of parasomnias include:

  • Night terrors

  • Confusion and anxiety upon waking up

  • Talking or moaning in your sleep

  • Nightmares

  • Eating in your sleep

  • Sexual behaviors while asleep

Sleepwalking symptoms: How to tell if someone is sleepwalking

People who sleepwalk don’t have the zombie gait with outstretched arms that you see in old movies. Their movements can be slow and disjointed. But they also might be agitated and purposeful. Sometimes sleepwalking includes other behaviors, like sexual acts or urinating in the wrong place. People may leave the house or even try to drive a car. 

Someone who’s sleepwalking doesn't usually respond to their name. If they react to a loud noise or to touch, they may respond in an irrational way. Sometimes it’s even unintentionally violent. But they aren’t aware of what they’re doing. And when they wake up, they don’t remember what happened.

Why do people sleepwalk?

Sleepwalking happens during slow-wave sleep, not rapid eye movement (REM) sleep. Slow-wave sleep happens more in the first part of the sleep cycle. This means that someone is not acting out their dreams when they sleepwalk. Instead, it happens when something causes a partial arousal out of a deep stage of sleep.

We still don’t know exactly why some people sleepwalk and what’s going on in the brain when they do. But conditions that increase or disturb slow-wave sleep can lead to sleepwalking.

What causes sleepwalking in adults?

01:31
Reviewed by Alexandra Schwarz, MD | January 12, 2025

In adults, causes of sleepwalking include

  • Obstructive sleep apnea: Many people who sleepwalk also have obstructive sleep apnea and snore, gasp, or have pauses in their breathing when they sleep. When sleep apnea is treated, sleepwalking often improves.

  • Shift work: Anything that disrupts the usual sleep-wake cycle can make parasomnias more likely.

  • Insomnia: Having insomnia, and experiencing trouble falling asleep or staying asleep decreases overall sleep time. And a lack of sleep is a risk factor for sleepwalking.

  • Heavy alcohol use: In some people, drinking a lot of alcohol can trigger an episode of sleepwalking if they’re already at risk.

  • Mental health conditions: People who sleepwalk are more likely to have depression, anxiety, and obsessive-compulsive disorder (OCD). But it’s not clear if one thing causes the other, or if they’re just more likely to occur together.

  • Stressful events: Many people who sleepwalk note that they have more frequent episodes when they’re under stress.

  • Family history of parasomnias: Around 1 in 3 people who sleepwalk have a family member who has had a parasomnia. There may be a genetic link that increases the risk.

Medications that may also increase the risk of parasomnias include

  • Sleep aids, like zolpidem (Ambien) 

  • Antidepressants, such as amitriptyline, bupropion, paroxetine, quetiapine, and olanzapine

  • Beta blocker blood pressure medications, like propranolol and metoprolol

  • Anticonvulsants, like topiramate

  • Asthma controllers, like montelukast 

  • Fluoroquinolone antibiotics, such as ciprofloxacin and levofloxacin

What causes sleepwalking in children?

Sleepwalking is much more common in kids. One study showed that fewer than 4% of adults in the United States had more than one episode of sleepwalking in the previous year. But almost 30% said they had done it at some point in their lives. It’s more likely to happen in kids who have a family history of sleepwalking or other parasomnias.

Children who sleepwalk will often outgrow it. But for some kids, sleepwalking is a symptom of another sleep disorder. This might include abnormal breathing patterns or restless leg syndrome

Is sleepwalking dangerous?

Most episodes of sleepwalking don’t lead to any harm. In a study of more than 600,000 emergency room visits, only 11 were due to sleepwalking. Although injuries aren’t common, a person who’s sleepwalking can hurt themselves or others without meaning to. 

People who sleepwalk may benefit from safety precautions, such as:

  • Putting padding around the bed

  • Removing or locking up sharp objects and firearms

  • Locking windows and doors

  • Arming doors and windows with an alarm that sounds when opened

Should you wake up a sleepwalker?

If you have a child, a partner, or a family member who sleepwalks, it’s important to keep them safe. But it helps to do it from a distance whenever possible. In rare cases people have committed violent acts while sleepwalking. But most of these are irrational reactions to a perceived threat. The person isn’t acting out a dream or subconscious feelings. It’s an unconscious startle reaction. 

So, if possible, don’t wake a sleepwalker. If you need to redirect them to safety, use a soft voice and gentle guidance.

How do you treat sleepwalking?

There’s no immediate cure or direct treatment for sleepwalking. Instead, treatment usually focuses on addressing some of the potential causes for sleepwalking. 

Most children who sleepwalk grow out of it. A child who sleepwalks now and then can be treated with watchful waiting and a few basic safety precautions. But if poor sleep is affecting their development or learning, they may need a sleep study.

Adults who sleepwalk more during times of stress may find help from psychotherapy and relaxation techniques. And many adults may benefit from a sleep study, especially if sleepwalking is a new behavior.

Sometimes sleepwalking is still a problem after identifying triggers and treating underlying causes. In these cases, clonazepam may be helpful for some people.

When should you see a doctor about sleepwalking?

You should see a healthcare provider for sleepwalking if:

  • It’s a repeated problem. 

  • You have hurt yourself or someone else while sleepwalking.

  • You’re taking sleep medication.

  • It’s significantly affecting your sleep quality, or you feel sleep deprived.

  • If you have noticed any changes in your mental health.

  • If you have only started sleepwalking as an adult.

Your doctor can help arrange a sleep study, which can identify underlying causes. For children and adults, a sleep study can check for underlying medical conditions, like breathing problems and restless leg syndrome, that may contribute to sleepwalking.

The bottom line

Sleepwalking is more common in children than in adults, especially if it runs in the family. For some people, it’s just an occasional nuisance. But for others it may be a safety concern or a symptom of an underlying sleep disorder. 

why trust our exports reliability shield

Why trust our experts?

Anne Jacobson, MD, MPH
Anne Jacobson, MD, MPH has been a board-certified family physician since 1999. She worked as a full-scope family physician (inpatient, outpatient, obstetrics, and office procedures) in the Cook County Ambulatory Health Network for 15 years.
Katie E. Golden, MD
Katie E. Golden, MD, is a board-certified emergency medicine physician and a medical editor at GoodRx.

Quality sleep is vital to get the most out of your waking hours. So if you have been sleepwalking, a sleep study may be the key to finding out why.

GoodRx Health has strict sourcing policies and relies on primary sources such as medical organizations, governmental agencies, academic institutions, and peer-reviewed scientific journals. Learn more about how we ensure our content is accurate, thorough, and unbiased by reading our editorial guidelines.

Was this page helpful?

Habits for a Healthier Mind

Sign up for our GoodRx Mental Well-being Newsletter to receive up-to-date information on the latest medications, tips, and savings that are most relevant to you.

By signing up, I agree to GoodRx's Terms and Privacy Policy, and to receive marketing messages from GoodRx.

Related Articles