How Does Sleepwalking Happen? Causes and Triggers

Sleepwalking happens when your brain gets stuck between deep sleep and wakefulness, leaving some parts of the brain “awake” enough to move your body while other parts remain fully asleep. It’s classified as a disorder of arousal, occurring during the deepest stage of non-rapid eye movement (NREM) sleep, known as N3 or slow-wave sleep. This half-and-half brain state explains the hallmark features of sleepwalking: a person can walk, talk, or perform surprisingly complex tasks while having no awareness of what they’re doing and little to no memory of it afterward.

What Happens Inside the Brain

During a normal night of sleep, your brain cycles through lighter and deeper stages before transitioning smoothly into REM sleep (the dreaming phase). Sleepwalking occurs when something disrupts the transition out of deep sleep. Instead of fully waking up or moving into the next sleep stage, the brain enters a mixed state where some regions activate while others stay dormant.

Brain imaging and deep electrode recordings have revealed a striking split during episodes. The motor cortex, which controls voluntary movement, wakes up. So do several deeper brain structures involved in emotion, balance, and basic sensory processing. But the frontal and parietal areas responsible for planning, decision-making, and self-awareness remain asleep. This is why a sleepwalker can navigate a hallway or open a door but can’t make rational judgments about what they’re doing.

The hippocampus, the brain’s hub for forming new memories, also stays in a sleep state during episodes. That’s the direct reason sleepwalkers rarely remember anything the next morning. Their brain was physically incapable of recording the experience.

Why Some People Are Prone to It

Sleepwalking runs strongly in families. Research into specific genes has identified a region on chromosome 6, within the immune system’s HLA complex, that appears linked to the condition. In one study, 35% of sleepwalkers carried a specific genetic variant (HLA-DQB1*05) compared to just 13% of controls, roughly tripling the odds. When researchers looked at families with multiple sleepwalkers, a shared amino acid pattern in this gene region was transmitted from parent to child at five times the expected rate. The connection between immune-related genes and a sleep disorder is still not fully understood, but the hereditary pattern is clear: if one or both of your parents sleepwalked, your chances go up significantly.

Age matters too. Sleepwalking is far more common in children, occurring at least occasionally in 10 to 30% of kids and most frequently between ages 4 and 6. Children spend more total time in deep slow-wave sleep than adults, which gives them more opportunity for these incomplete arousals. Most outgrow it. In adults, occasional sleepwalking affects roughly 3 to 4% of the population, while frequent episodes (weekly or more) occur in less than half a percent.

Triggers That Set Off an Episode

Having a genetic predisposition doesn’t mean you’ll sleepwalk every night. Episodes typically require a trigger, something that partially rouses you from deep sleep without completing the transition to full wakefulness. The most well-documented triggers include:

  • Sleep deprivation. When you’re overtired, your brain compensates by spending more time in deep slow-wave sleep. More deep sleep means more chances for an incomplete arousal. Sleep-deprived people also tend to perform more complex behaviors during episodes.
  • Stress and anxiety. Research links psychological stress, childhood trauma, and PTSD to a higher risk of sleepwalking, likely because stress fragments sleep architecture and increases the number of partial awakenings.
  • Alcohol. Drinking before bed disrupts normal sleep cycling and can trigger episodes in people who are predisposed.
  • Environmental disturbances. A full bladder, a loud noise, illness, or fever can all nudge someone just far enough out of deep sleep to trigger an episode without fully waking them.
  • Other sleep disorders. Conditions like sleep apnea repeatedly interrupt sleep cycles throughout the night, creating more opportunities for these mixed brain states.
  • Certain medications. Some prescription sleep aids, particularly zolpidem (Ambien), are known to trigger sleepwalking. The drug’s labeling explicitly warns that users may drive, eat, make phone calls, or have sex while not fully awake, with no memory of it the next day.

Less commonly, medical conditions can cause sleepwalking in people who never had it before. Hyperthyroidism and degenerative brain conditions like Parkinson’s disease have both been linked to new-onset episodes in adults.

What Sleepwalking Actually Looks Like

The popular image of a sleepwalker shuffling around with arms outstretched is mostly fiction. Real episodes range widely in complexity. Some people simply sit up in bed, look around with a glassy expression, and lie back down. Others get up, walk through the house, open doors, rearrange objects, or go to the bathroom in inappropriate places. At the extreme end, sleepwalkers have been documented cooking meals, leaving the house, and even attempting to drive.

During an episode, sleepwalkers typically have a blank, unfocused expression. They may respond to questions with slow, mumbled, or nonsensical answers. Their movements can appear coordinated enough to handle basic motor tasks but lack the finesse of someone who’s fully alert. Attempting to wake a sleepwalker is difficult because their arousal threshold is extremely high. If you do manage to wake them, they’re usually confused and disoriented for several minutes.

Episodes most commonly happen in the first third of the night, when deep slow-wave sleep is most concentrated. They typically last anywhere from a few seconds to 30 minutes, though longer episodes have been reported.

Reducing the Risk of Episodes

Because sleep deprivation is one of the strongest triggers, the most effective preventive step is consistent, adequate sleep. For adults, that means keeping a regular schedule and aiming for seven to nine hours. For children who sleepwalk, an age-appropriate bedtime with a calm wind-down routine can reduce the frequency of episodes.

Addressing other triggers helps too. Limiting alcohol before bed, managing stress, and treating underlying sleep disorders like sleep apnea can all lower the number of partial arousals during the night. If sleepwalking started after beginning a new medication, that’s worth discussing with the prescriber.

For frequent sleepwalkers, safety modifications at home make a practical difference. Locking windows and exterior doors, installing gates at the top of stairs, keeping the floor clear of objects that could cause a fall, and sleeping on the ground floor when possible all reduce the risk of injury during an episode. Some families use door alarms or motion-sensor chimes as an early alert system.

If episodes are frequent, distressing, or involve dangerous behaviors, a sleep specialist can evaluate whether an underlying condition is driving them. In some cases, scheduled awakenings (gently waking the person about 15 to 20 minutes before episodes typically occur) can break the cycle, especially in children with predictable timing.