Sleepwalking happens when the brain is partly awake and partly asleep at the same time. It occurs during deep non-REM sleep, usually in the first third of the night, when the body can move but the mind is not fully conscious. The causes range from genetics and sleep deprivation to fever, some medications, and other sleep disorders. Most episodes are brief and harmless, but the condition can run in families and is more common in children than adults.
Why Do You Sleepwalk?
Sleepwalking is a parasomnia — a behavior that happens during sleep. It is not a dream being acted out. It occurs when a person is caught between deep sleep and wakefulness. The deepest stage of non-REM sleep, sometimes called slow-wave sleep, is when the body normally stays still. In a sleepwalker, that stillness breaks down.
During an episode, the sleeper may sit up, walk around, open doors, or even leave the house. Their eyes are usually open. They may mumble or answer simple questions. Most episodes last a few minutes. The person typically has no memory of it the next day.
The key point is that sleepwalking is not a sign of a mental health problem or a dream disorder. It is a glitch in the normal sleep cycle. Something has caused the brain to partially wake during deep sleep while the body’s movement systems stay active.
What Triggers a Sleepwalking Episode?
The single most common trigger is not getting enough sleep. When someone is sleep-deprived, their body pushes harder into deep sleep. That deeper pressure makes a partial wake-up more likely. This is why sleepwalking often shows up after a late night, a missed nap, or a stretch of poor sleep.
Other triggers are well documented in sleep medicine:
- Fever or illness. Fever is a known trigger in children. Sleepwalking episodes often cluster when a child is sick.
- Sleep interruptions. Noise, a full bladder, or an irregular sleep schedule can fragment sleep and set off an episode.
- Alcohol. In adults, alcohol can disrupt sleep architecture and increase the chance of an episode.
- Stress and anxiety. Emotional stress does not cause sleepwalking directly, but it can worsen sleep quality and make episodes more likely.
- Some medications. Certain drugs, including some sleep aids and medicines that affect brain chemistry, have been linked to sleepwalking. This is a reason to tell a doctor about any new sleep behaviors after starting a medication.
One clarification worth knowing: sleepwalking is not caused by dreaming. It happens in deep non-REM sleep, not during the REM stage where most vivid dreams occur. The old idea that a sleepwalker is “acting out a dream” is a myth.
Is Sleepwalking Genetic?
Yes, genetics plays a real role. Sleepwalking tends to run in families. If one parent has a history of sleepwalking, a child is more likely to sleepwalk too. When both parents have a history, the chance rises further.
Researchers have identified that sleepwalking clusters in families, and some studies point to specific genetic factors. The exact genes are still being studied, so the picture is not complete. What is clear is that a family history is one of the strongest known risk factors.
Genetics alone does not cause episodes. It appears to set the stage, and then a trigger — poor sleep, fever, stress — tips the person into an episode. This is why some people sleepwalk only during certain periods of life and not others.
Who Sleepwalks Most — Children or Adults?
Sleepwalking is far more common in children. It most often begins between ages 4 and 8 and usually fades by the teen years. Many children outgrow it completely. The reason is thought to be related to how the young brain matures and how deep sleep is regulated during development.
Adults can sleepwalk too, but it is less common. When sleepwalking starts for the first time in adulthood, it deserves more attention. Adult-onset sleepwalking is more likely to be linked to another sleep disorder, a medication, a medical condition, or substance use. A doctor should evaluate new sleepwalking in an adult.
What Sleep Disorders Are Linked to Sleepwalking?
Sleepwalking often travels with other sleep problems. When these are present, treating them can reduce episodes.
Obstructive sleep apnea is one of the most important. In sleep apnea, breathing repeatedly stops and restarts during sleep. The repeated awakenings fragment sleep and can trigger sleepwalking and other parasomnias. Some research suggests that treating sleep apnea reduces sleepwalking episodes in people who have both. This is a case where the sleepwalking may be a symptom of an underlying breathing problem.
Restless legs syndrome is another linked condition. It causes an urge to move the legs, usually at night, and disrupts sleep. The poor sleep quality can contribute to parasomnias.
Sleepwalking can also be confused with other conditions. REM sleep behavior disorder is different — people act out dreams, often with forceful movements, and it happens in REM sleep. It is more common in older adults and has different implications. A sleep specialist can tell these apart. This distinction matters because the two conditions are managed differently.
When Should You See a Doctor?
Most childhood sleepwalking is harmless and does not need treatment. The main concern is safety, not the sleepwalking itself. A doctor’s visit is warranted in certain situations.
See a doctor if:
- Episodes are frequent or getting worse
- The person does something dangerous during an episode, like leaving the house or using stairs
- There is a risk of injury to the sleeper or others
- Sleepwalking begins for the first time in adulthood
- Episodes come with violent or unusual behavior
- There are signs of another sleep disorder, such as loud snoring, gasping, or excessive daytime sleepiness
There is no single test for sleepwalking. A doctor usually makes the diagnosis from the history, often with input from a bed partner or family member. In some cases, an overnight sleep study is used to rule out conditions like sleep apnea.
How Can You Reduce Sleepwalking Episodes?
The most reliable approach is to protect sleep and make the environment safe. These steps are widely recommended by sleep clinicians.
First, aim for a consistent sleep schedule with enough total sleep. Going to bed and waking at the same time helps regulate deep sleep and lowers the chance of an episode.
Second, make the bedroom and home safer. This is the priority when someone sleepwalks:
- Keep floors clear of objects
- Lock doors and windows, or use door alarms
- Use gates at the top of stairs
- Keep car keys out of reach
- Consider a bell on the bedroom door
Third, address triggers. Limit alcohol. Manage stress where possible. Review medications with a doctor if episodes began after starting a new drug. If sleep apnea or another sleep disorder is present, treating it may help.
Gentle waking is sometimes used in children. Some clinicians suggest briefly waking a child shortly after they fall asleep to interrupt the deep-sleep cycle. The evidence for this is limited, so it is best discussed with a doctor rather than done routinely.
Medication is rarely the first step. It is generally reserved for frequent, dangerous, or hard-to-manage cases and is prescribed by a clinician. No medication is approved specifically to treat sleepwalking, so treatment choices are made case by case.
Is Sleepwalking Dangerous?
For most people, sleepwalking is not dangerous in itself. The body’s coordination is usually preserved enough to walk, and most episodes end without incident. The real risk is injury — from stairs, sharp objects, or leaving the home.
Serious injury is uncommon but possible. This is why safety measures matter more than trying to stop every episode. A person should not be shaken or shouted at during an episode. Instead, guide them gently back to bed if it is safe to do so.
It also helps to know that sleepwalkers are not violent by nature. Aggressive behavior during sleep is more typical of other sleep disorders and should be evaluated by a doctor.
Frequently Asked Questions
Why do people sleepwalk?
Sleepwalking happens when the brain is partly awake during deep non-REM sleep, letting the body move while the mind is not fully conscious. It is usually triggered by sleep deprivation, fever, stress, alcohol, or another sleep disorder.
Is sleepwalking hereditary?
Yes, sleepwalking tends to run in families, and a family history is one of the strongest known risk factors. Genetics appear to set the stage, while triggers like poor sleep or fever bring on episodes.
Can adults sleepwalk?
Yes, though it is less common than in children. Sleepwalking that begins for the first time in adulthood should be checked by a doctor, because it is more likely to be linked to another sleep disorder, a medication, or a medical condition.
Is it safe to wake a sleepwalker?
It is generally safe, but the person may be confused or startled. It is usually better to guide them gently back to bed rather than shake or shout at them.

