Sleepwalking Happens in What Stage of Sleep?

Sleepwalking occurs during deep non-REM sleep, the stage now labeled N3, which is dominated by large, slow brain waves. This has been recognized since the late 1960s, when researchers confirmed that sleepwalking arises not from dreams but from incomplete awakenings out of the deepest phase of sleep. The brain activity during an episode looks nothing like what most people imagine, and the triggers, genetics, and occasional overlap with other sleep stages make the full picture more interesting than the simple answer suggests.

Deep Sleep and the Disorder of Arousal

Sleep cycles through lighter stages into progressively deeper ones before swinging back up toward REM (the dream-heavy phase). The deepest non-REM stage, N3, produces the characteristic slow electrical waves that give it the name “slow-wave sleep.” Sleepwalking episodes almost always launch from this stage, typically during the first third of the night when slow-wave sleep is most concentrated.

A landmark 1968 study in Science established the framework still used today: sleepwalking, night terrors, and confusional arousals all belong to a family called “disorders of arousal.” They emerge during arousals from slow-wave sleep and are, in the study’s words, “virtually never associated with the rapid-eye-movement dreaming state.”1PubMed. Sleep disorders: disorders of arousal? Enuresis, somnambulism, and nightmares occur in confusional states of arousal, not in “dreaming sleep” The key insight was that these events are best understood not as products of dreaming but as products of the arousal process itself. Something goes wrong as the brain tries to shift out of deep sleep, and instead of waking up fully, the person enters a dissociated state: the motor system activates, but consciousness does not.

What the Brain Looks Like Right Before an Episode

Researchers have used high-density EEG recordings to peer into what happens in a sleepwalker’s brain in the minutes and seconds before they get up. One finding is that slow-wave activity and the density of slow oscillations are significantly greater before a sleepwalking episode compared with non-behavioral awakenings from the same sleep stage.2PubMed Central. Electroencephalographic slow waves prior to sleepwalking episodes In other words, the brain appears to be in an especially deep version of deep sleep right before it partially wakes. This is counterintuitive: you might expect a lighter sleep state to precede the event, but instead the brain seems to be stuck in an unusually intense slow-wave state that it then struggles to exit cleanly.

At the moment of the episode, a different pattern emerges. EEG imaging has shown a burst of fast-frequency brain activity in a region called the cingulate motor area, which sits along the inner surface of the brain and is involved in planning and executing movements.3PubMed Central. Sleepwalking episodes are preceded by arousal-related activation in the cingulate motor area: EEG current density imaging So the sequence looks something like this: deep slow-wave sleep intensifies, then a sudden arousal fires up the motor-planning regions while the higher-order parts of the brain responsible for awareness and judgment stay offline. The result is a body in motion without a fully conscious person steering it.

The Relationship to Night Terrors and Confusional Arousals

Sleepwalking does not exist in isolation. It sits on a spectrum with two close relatives: confusional arousals, where a person sits up or thrashes in bed without fully waking, and night terrors, where a person bolts upright screaming, heart pounding, and has no memory of it afterward. All three arise from the same mechanism: a botched transition out of deep NREM sleep. A population-level survey found that confusional arousals affect about 4% of adults, sleepwalking about 2%, and night terrors about 2%, with rates declining significantly with age and no difference between men and women.4PubMed. Night terrors, sleepwalking, and confusional arousals in the general population: their frequency and relationship to other sleep and mental disorders People who experience one of these conditions are more likely to experience the others, reinforcing the idea that they share a common underlying vulnerability in how the brain handles deep-sleep arousals.

How Common Is Sleepwalking, and Who Gets It

A meta-analysis pooling data from studies across multiple countries estimated that about 7% of people will sleepwalk at some point in their lives. The condition is far more common in children: roughly 5% of kids sleepwalk in any given year, compared with about 1.5% of adults.5PubMed Central. Prevalence of Sleepwalking: A Systematic Review and Meta-Analysis The fact that children spend proportionally more time in deep slow-wave sleep helps explain why. As people age, slow-wave sleep naturally shrinks, and sleepwalking tends to fade with it. That said, the meta-analysis found no clear developmental trend within childhood itself; a five-year-old and a ten-year-old were roughly equally likely to sleepwalk.

The decline continues into older adulthood, which aligns with what we know about sleep architecture: older adults produce less deep sleep overall, which means fewer opportunities for the arousal glitch that triggers an episode.

Genetics and the HLA Connection

Sleepwalking runs in families, and researchers have found a specific genetic link. A study comparing sleepwalkers with controls found that a particular gene variant in the HLA system, DQB1*0501, was present in 35% of sleepwalkers versus 13% of controls, giving carriers roughly 3.5 times the odds of being a sleepwalker.6PubMed. HLA and genetic susceptibility to sleepwalking The HLA system is best known for its role in immune function, but certain HLA genes also turn up in other sleep disorders, including narcolepsy and REM sleep behavior disorder. The fact that the same genetic neighborhood influences such different sleep conditions suggests it plays a broader role in how the brain regulates transitions between sleep states.

This does not mean that a single gene causes sleepwalking. Having the variant raises the risk, but plenty of carriers never sleepwalk, and plenty of sleepwalkers do not carry it. The genetics likely involve multiple genes interacting with environmental triggers.

What Triggers an Episode

If the underlying vulnerability is genetic, the proximate triggers are environmental. Sleep deprivation is the best-documented one. In a clinical study, keeping patients awake for 25 hours before letting them sleep nearly doubled the number of sleepwalking episodes recorded in the lab and raised the proportion of patients who had at least one episode from 48% to 63%.7PubMed. Differential effects of sleep deprivation on sleepwalking: Role of demographic and clinical profiles Sleep deprivation works because the brain compensates by producing more intense slow-wave sleep during recovery, creating exactly the conditions that make an incomplete arousal more likely. EEG studies confirm that sleep deprivation increases the amount of a particular deep-sleep pattern called hypersynchronous delta waves, especially over the frontal brain regions.8PubMed. Hypersynchronous delta waves and somnambulism: brain topography and effect of sleep deprivation

Other triggers include anything that fragments sleep or forces repeated partial arousals from deep sleep. Obstructive sleep apnea is a well-recognized culprit: each apnea event can jolt the brain partway awake, and in a predisposed person, that partial arousal can tip into a full sleepwalking episode.9Journal of Sleep Medicine. A Case of Re-Emergent Sleepwalking in Adulthood, Primed by Sleep Deprivation and Triggered by Sleep Apnea Alcohol, stress, fever, a full bladder, and sleeping in an unfamiliar environment can all play similar roles.

Medications That Can Cause Sleepwalking

Certain drugs are known to provoke sleepwalking, sometimes in people who have never experienced it before. The most notorious is zolpidem (sold as Ambien), a widely prescribed sleep medication that works on the brain’s GABA receptors. Case reports have documented sleepwalking, sleep-related eating, and even sleep-driving in patients taking zolpidem.10PubMed Central. Zolpidem-induced sleepwalking, sleep related eating disorder, and sleep-driving: fluorine-18-flourodeoxyglucose positron emission tomography analysis, and a literature review of other unexpected clinical effects of zolpidem The mechanism is thought to involve the drug’s selective effect on certain brain circuits: it may sedate some regions while leaving motor pathways relatively active, creating a chemical version of the same dissociated state that occurs in spontaneous sleepwalking.

Other medications implicated include certain antidepressants, lithium, and some antipsychotics, though the evidence for these is mostly from case reports rather than systematic studies. When medication-induced sleepwalking is suspected, the first step is usually to taper or switch the offending drug.

Can Sleepwalking Happen During REM Sleep?

The standard answer is that sleepwalking is a non-REM phenomenon, and that is correct for the vast majority of cases. But a rare condition called parasomnia overlap disorder blurs the line. In this disorder, features of both NREM parasomnias (like sleepwalking) and REM sleep behavior disorder (where people act out dreams because the normal muscle paralysis of REM sleep fails) coexist in the same patient. A documented case involved a woman who developed a brainstem inflammatory lesion that led to both REM sleep behavior disorder and nightly sleepwalking. Her sleep study showed that 44% of her REM sleep lacked normal muscle paralysis, and she exhibited complex movements during both REM and non-REM stages.11PubMed Central. A brainstem inflammatory lesion causing REM sleep behavior disorder and sleepwalking (parasomnia overlap disorder)

Cases like this are the exception, not the rule. They tend to arise from neurological damage or specific lesions in the brainstem regions that regulate sleep-stage transitions. For the typical sleepwalker, the episodes emerge from NREM deep sleep, and REM sleep is not involved.

What Sleepwalkers Can Actually Do

The popular image of a sleepwalker shuffling around with arms outstretched is mostly fiction. Real sleepwalking behaviors range from sitting up in bed and looking around with a blank expression all the way to getting dressed, leaving the house, or attempting to cook. The behaviors can look purposeful on the surface, but they are clumsy, poorly coordinated, and lack the goal-directed logic of waking behavior. Sleepwalkers rarely respond meaningfully to speech, and they almost never remember the episode afterward.

Violence during sleepwalking is uncommon but documented. A review of the topic noted that violence toward others can result in serious injury or, in rare cases, death.12PubMed Central. A biopsychosocial model of violence when sleepwalking: review and reconceptualisation The violence is typically reactive rather than predatory: a sleepwalker may lash out when touched or restrained, apparently perceiving the contact as a threat in their confused state. The person is not acting on waking emotions or intentions.

Sleepwalking in the Courtroom

Because sleepwalkers lack conscious awareness and typically have no memory of their actions, sleepwalking has been used as a legal defense in criminal cases for centuries. Medieval medical writers already recognized the problem: if the imagination was running unchecked while reason was disabled by sleep, could a person be held responsible for what their body did?13PubMed. Sleepwalking, violence and desire in the middle ages That question has never fully been settled, and modern forensic medicine takes it seriously.

A forensic study evaluating criminal defendants who claimed sleepwalking as a defense found that about 22% were judged to have genuinely lacked criminal responsibility due to sleep automatism. These cases shared common features: the violence was directed at family members, the person was confused and amnestic upon waking, and there was no apparent motive. By contrast, the majority of defenses were rejected, often because the person was intoxicated or the behavior was too complex and goal-directed to be consistent with a parasomnia.14PubMed. Sleep-related violence in parasomnias: Forensic and clinical insights for criminal responsibility assessments The legal landscape has been shaped by high-profile sleepwalking cases going back to the 1800s, with courts and medical experts continuously refining the criteria for distinguishing genuine sleep automatism from malingering.15PubMed. Sleepwalking through history: medicine, arts, and courts of law

How Sleepwalking Is Diagnosed

For most children who sleepwalk occasionally, no formal diagnosis is needed. When episodes are frequent, dangerous, or persist into adulthood, clinicians use video-polysomnography, a monitored overnight sleep study that records brain waves, muscle activity, eye movements, heart rate, and video simultaneously. The challenge is that sleepwalking may not occur on a given night in the lab. To improve the odds, sleep clinics sometimes use sleep deprivation as a diagnostic tool: keeping the patient awake for 25 hours before the study roughly doubles the chance of capturing an episode and has been validated as a useful provocation method.16PubMed. Polysomnographic diagnosis of sleepwalking: effects of sleep deprivation

The sleep study also helps rule out other conditions that can mimic sleepwalking, including nocturnal epilepsy and REM sleep behavior disorder. These require different treatments, so accurate diagnosis matters.

Treatment Approaches

Treatment generally starts with identifying and addressing triggers. If sleep apnea is fragmenting sleep, treating it with a CPAP machine can eliminate sleepwalking episodes. If a medication is the culprit, switching drugs may resolve the problem. For everyone, basic sleep hygiene matters: keeping a consistent sleep schedule, avoiding sleep deprivation, and limiting alcohol intake.

A behavioral technique called scheduled awakenings has shown effectiveness in children. Parents learn the typical time their child sleepwalks and briefly wake the child about 15 to 30 minutes before that window. A study using this approach found it eliminated sleepwalking in all three children tested, with effects lasting at least six months after stopping the intervention.17PubMed. The use of scheduled awakenings to eliminate childhood sleepwalking The rationale is that the gentle awakening disrupts the slow-wave sleep cycle just before it would otherwise produce the incomplete arousal that triggers an episode.

When behavioral measures are not enough, medications enter the picture. Clonazepam, a benzodiazepine, is the most commonly used first-line drug.18PubMed Central. Successful Treatment of Somnambulism With OROS-Methylphenidate A large retrospective study of over 500 patients with NREM parasomnias found that about 97% ultimately achieved adequate symptom control. Roughly 60% needed medication to get there, while about a third managed with non-drug approaches alone. Among those on medication, benzodiazepines were most commonly prescribed, followed by antidepressants, z-drugs, and melatonin.19PubMed Central. NREM parasomnias: a treatment approach based upon a retrospective case series of 512 patients Other approaches used in clinical practice include hypnosis, gabapentin, and pregabalin, though the evidence base for these is thinner.20Lechaschi Vrach. Etiopathogenetic treatment options for somnambulism

Safety in the Meantime

Whatever the treatment plan, making the sleep environment safer is practical and immediate. Sleepwalkers have been known to fall down stairs, walk out of doors, and handle sharp objects. Locking windows and exterior doors, installing gates at the top of stairs, removing sharp or breakable objects from the bedroom, and sleeping on the ground floor if possible all reduce the risk of injury. If you live with a sleepwalker, the general advice is not to try to restrain them forcefully, which can provoke a startled, sometimes aggressive reaction. Gently guiding them back to bed is safer.

For parents of children who sleepwalk, the most reassuring fact is that most kids outgrow it. The episodes tend to cluster in early-to-middle childhood and naturally fade as slow-wave sleep becomes less dominant. Persistent sleepwalking into adulthood, especially if episodes are frequent or involve dangerous behaviors, deserves a conversation with a sleep specialist.

Medieval Theories and the Imagination Run Wild

Long before EEGs and polysomnography, people tried to explain why sleepwalkers could walk, fight, and even ride horses without waking up. Thirteenth- and fourteenth-century medical writers proposed that during sleep, reason and sensation shut down but the imagination, which they believed was physically located near the front of the brain, remained active. In their framework, daytime fears and traumas could take control of the body during sleep because the rational faculty was not available to override them. The classic example they cited was an aristocrat who rose from bed, armed himself, and mounted his horse, all while asleep, apparently acting out a battle or a hunt.13PubMed. Sleepwalking, violence and desire in the middle ages

What is striking is how much that explanation, stripped of its anatomical specifics, resembles the modern understanding. Replace “the imagination” with “the motor cortex” and “reason disabled by sleep” with “prefrontal cortex offline during deep NREM sleep,” and you have roughly the same idea: a dissociation between the parts of the brain that move the body and the parts that provide conscious awareness and judgment. The medieval writers got the mechanism wrong in detail but right in structure, which is more than can be said for many historical medical theories.