What Makes People Sleepwalk: Brain, Genes, and Triggers

Sleepwalking happens when your brain gets stuck between deep sleep and wakefulness, leaving some regions fully asleep while others activate enough to move your body. About 7% of people will sleepwalk at some point in their lives, with children affected far more often than adults. The causes range from genetics and sleep deprivation to medications and stress, but they all share the same underlying mechanism: a partial arousal from the deepest stage of sleep.

A Brain Half Asleep, Half Awake

During normal sleep, your brain cycles through several stages. The deepest stage, called N3 or slow-wave sleep, is when sleepwalking episodes begin. In a typical awakening from this stage, your brain shifts fully into wakefulness within seconds. Wake-promoting neurons in the brainstem and base of the forebrain suppress the slow electrical waves of deep sleep and replace them with faster activity associated with consciousness.

In sleepwalkers, this transition fails partway through. Brain imaging and electrode recordings have shown that during an episode, the motor cortex and movement coordination pathways light up with wake-like activity, while the frontal lobe, which handles judgment, planning, and self-awareness, stays locked in deep sleep patterns. The hippocampus, critical for forming memories, also remains dormant. This explains the hallmark features of sleepwalking: you can walk, open doors, and even carry out complex actions, but you have no decision-making ability and little to no memory of it afterward.

One case that illustrates this vividly involved a 16-year-old whose brain was scanned during a sleepwalking episode. Blood flow surged through pathways that coordinate movement while the frontal lobe showed almost no activation. In a separate case, a 20-year-old undergoing brain monitoring had a partial arousal where the motor and mid-brain regions showed full wakefulness while the frontal and parietal association areas, responsible for higher-order thinking, displayed delta waves consistent with deep sleep. The brain was literally in two states at once.

Why Children Sleepwalk More Than Adults

Children spend significantly more time in deep slow-wave sleep than adults do, which gives them more opportunity for these partial arousals. A meta-analysis covering more than 100,000 people found that 5% of children had sleepwalked in the past year, compared to just 1.5% of adults. Most children who sleepwalk grow out of it as their sleep architecture matures and the proportion of deep sleep naturally decreases through adolescence.

Genetics Play a Real Role

Sleepwalking runs in families. If one of your parents sleepwalked, your risk is substantially higher, and if both did, it climbs further. Researchers have identified a specific immune-system gene variant, HLA DQB1*05:01, that appears at elevated rates in people with sleepwalking and related disorders. In one study, 41% of people with these conditions carried this gene variant compared to about 24% in the general population. The same variant shows up regardless of the specific type of partial-arousal disorder, suggesting a shared genetic vulnerability rather than separate conditions.

This genetic component doesn’t guarantee you’ll sleepwalk. It likely lowers the threshold for partial arousals, making your brain more prone to getting stuck between sleep stages when other triggers are present.

Common Triggers in Everyday Life

In people who are already predisposed, certain conditions make episodes more likely. Sleep deprivation is one of the most consistent triggers because it increases the pressure for deep sleep, making your brain spend more time in N3 and making arousals from that stage harder to complete cleanly. Fever works similarly by deepening and disrupting sleep simultaneously.

Other common triggers include:

  • Stress and anxiety: Emotional strain fragments sleep and increases the number of arousals during the night
  • Irregular sleep schedules: Shift work, jet lag, or inconsistent bedtimes destabilize sleep cycles
  • Noise and environmental disturbances: External stimuli can partially rouse a sleeper from deep sleep without fully waking them
  • A full bladder: Internal signals that aren’t quite strong enough to wake you completely can trigger an episode

Anything that either increases the depth of sleep or increases the number of disruptions during sleep can tip the balance toward a partial arousal.

Medications That Can Cause Sleepwalking

Certain prescription sleep aids are strongly linked to sleepwalking, even in people with no prior history. The FDA added its most serious warning label to three sedative-hypnotic medications (sold under brand names including Ambien, Lunesta, and Sonata) after reports of complex sleep behaviors like walking, driving, and eating while not fully awake. These drugs work by suppressing brain activity to induce sleep, but they can also interfere with the normal arousal process, creating exactly the kind of partial wakefulness that produces sleepwalking.

The risk increases when these medications are combined with alcohol, anti-anxiety drugs, opioids, or other sedating substances. These combinations further suppress the brain’s ability to transition cleanly between sleep and wakefulness.

Sleepwalking and Mental Health

There’s a common assumption that sleepwalking signals deeper psychological problems, but the evidence doesn’t support this for most people. A study that screened adult sleepwalkers for depression, anxiety, and general psychological distress found that their scores were broadly similar to the general population. About 15% showed moderate to severe depressive symptoms and 19% had notable anxiety, rates that aren’t dramatically different from population averages. Sleepwalking is primarily a sleep disorder, not a psychiatric one.

That said, stress and poor mental health can act as triggers. The relationship tends to work in one direction: anxiety and stress fragment sleep, which increases arousals, which makes episodes more likely in someone already predisposed. The sleepwalking itself isn’t caused by the emotional state, but the emotional state creates conditions that allow it to surface.

What Happens During an Episode

Sleepwalking episodes typically last a few minutes, though some can extend longer. The range of behaviors is surprisingly wide. Some people simply sit up in bed looking confused. Others get up, walk through the house, get dressed, eat food, or hold garbled conversations. In more extreme cases, people have left their homes, driven cars, or engaged in sexual activity with no awareness.

During an episode, a sleepwalker’s eyes are usually open but have a glassy, unfocused look. They generally don’t respond normally when spoken to or may react with confusion. Waking a sleepwalker abruptly can sometimes provoke brief aggression or violent confusion, not because they’re dangerous by nature, but because their frontal lobe is still catching up from its sleep state.

The real danger is physical injury. Sleepwalkers can fall down stairs, walk into furniture, trip over objects, or in rare cases jump from windows. They lack the judgment to assess risk because the part of the brain responsible for that assessment is still asleep.

How Sleepwalking Is Identified

Sleep specialists use a set of criteria to distinguish sleepwalking from other conditions. The key features are: recurrent episodes of incomplete awakening from sleep, unresponsiveness to people trying to intervene during an episode, little or no dream imagery associated with the behavior, and partial or complete amnesia for what happened. The episodes must also involve getting out of bed and moving around, which separates sleepwalking from simpler partial arousals where someone might just sit up or mumble.

In some cases, an overnight sleep study with video monitoring can capture an episode and confirm the diagnosis. In one clinical series, about 70% of known sleepwalkers had an event during monitored sleep, which helps rule out other conditions like seizures or REM sleep behavior disorder that can look similar from the outside.

Reducing the Risk of Episodes

Because most triggers boil down to disrupted or insufficient sleep, the most effective prevention strategy is consistent, adequate sleep. Going to bed and waking up at the same time every day, getting enough total sleep, and reducing alcohol and caffeine in the evening all help stabilize sleep architecture and reduce the frequency of partial arousals. Managing stress through whatever works for you, whether exercise, therapy, or lifestyle changes, removes another common trigger.

For people with frequent episodes, making the sleeping environment safer matters. This can mean sleeping on a ground-floor bedroom, securing windows, removing sharp objects or obstacles, and installing alarms on doors. If a specific medication seems to be triggering episodes, that’s a conversation worth having with a prescriber, since switching to a different class of sleep aid can sometimes resolve the problem entirely.