Sleep · Updated November 2026

Sleepwalking: How It Works, Why It Happens and How to Stay Safe

Sleepwalking (somnambulism) happens when the brain partially wakes from deep non-REM sleep: the parts controlling movement switch on while the parts responsible for awareness and memory stay asleep. Sleepwalkers can sit up, walk, talk or even do complex tasks with no memory afterward. It's common in children and usually outgrown, and less common in adults. Triggers include sleep deprivation, stress, irregular schedules, alcohol, some medications, fever and sleep apnea. The main risk is injury, so safety measures matter; treating triggers usually reduces episodes.

How sleepwalking works

Sleep cycles through stages roughly every 90 minutes. Sleepwalking arises from stage N3 (deep, slow-wave sleep), mostly in the first third of the night. During an episode:

  • Brain regions controlling movement and emotion become active, as if awake.
  • The prefrontal cortex, responsible for judgment and memory formation, remains in a sleep-like state.
  • The result is a "mixed state": the person moves but isn't consciously aware.

This is different from acting out dreams, which happens in REM sleep (REM sleep behavior disorder, more common in older adults).

What sleepwalking looks like

  • Sitting up in bed, looking around with a glassy stare
  • Walking around the house, sometimes trying to leave
  • Talking or mumbling, often not making sense
  • Doing routine actions: opening cupboards, moving objects, getting dressed
  • Rarely, more complex behaviors like eating (sleep-related eating) or driving
  • Difficult to wake; confused if woken
  • No memory of the episode next morning

Episodes usually last a few seconds to 30 minutes.

Who sleepwalks?

  • Children: up to 1 in 5 children sleepwalk at some point, most often between ages 4 and 12. Most outgrow it by adolescence.
  • Adults: around 1–4% of adults sleepwalk. Some have done so since childhood; others start in adulthood, often linked to triggers.
  • Family history: strongly genetic; risk is much higher if a parent sleepwalked.

Common triggers

TriggerWhy
Sleep deprivationIncreases deep sleep pressure and partial arousals
Irregular scheduleDisrupts sleep stages
Stress and anxietyIncreases arousal
AlcoholFragments sleep
Certain medicationsSome sleep aids (e.g., zolpidem), sedatives, antidepressants, antipsychotics
Fever and illnessEspecially in children
Sleep apnea and restless legsRepeated awakenings from deep sleep
Full bladder or noiseCan trigger partial arousals

Can sleepwalking be dangerous?

Yes, mainly due to injury. Sleepwalkers can fall down stairs, walk into objects, go outside, or handle sharp items. Rarely, adults behave aggressively, especially if someone tries to restrain them. Sleep-related eating can involve unsafe foods or using kitchen appliances. A clinical review of somnambulism emphasizes environmental safety as a first priority.

Should you wake a sleepwalker?

It's a myth that waking a sleepwalker is dangerous to them, but it can cause confusion, fear or agitation. The best approach is to gently guide them back to bed using a calm voice, without grabbing or restraining. If they're in danger, such as heading for stairs or outside, wake them gently or block the way.

How to make the home safe

  • Lock doors and windows, or use door alarms or bells.
  • Install gates at the top of stairs.
  • Move sharp objects, car keys and medications out of reach.
  • Keep floors clear of clutter.
  • Sleep on the ground floor if possible.
  • Avoid bunk beds for children who sleepwalk.
  • Use motion-sensor night lights.

How to reduce sleepwalking

  1. Get enough sleep. This is the most important step. Children need 9–12 hours; adults 7–9.
  2. Keep a regular sleep schedule, including weekends.
  3. Create a calm bedtime routine; see calming bedtime routine.
  4. Manage stress with relaxation techniques; see progressive muscle relaxation.
  5. Avoid alcohol and review medications with your doctor.
  6. Empty your bladder before bed and limit evening fluids.
  7. Scheduled awakenings: for children with frequent episodes at predictable times, gently waking them 15–30 minutes before the usual episode for a few weeks can break the pattern.
  8. Treat underlying sleep disorders like sleep apnea or restless legs.

Sleepwalking and sleep deprivation in adults

In adults, a run of short nights is one of the most reliable triggers. Shift work, jet lag, new parenthood and stressful deadlines all increase deep-sleep pressure and partial arousals. If sleepwalking appears during a demanding period, protecting sleep, even adding 30–60 minutes a night, is often enough to calm it down. Our guide on how sleep deprivation affects the body explains why catching up matters, and alcohol is a common hidden trigger too; see alcohol as a sleep aid backfires.

Keeping a sleepwalking diary

Recording the time of each episode, what happened, bedtime, alcohol, stress, illness and medications for a few weeks helps you and your doctor identify patterns and triggers, and shows whether changes are working.

Can sleepwalking be cured?

In children, it usually resolves on its own. In adults, addressing triggers often reduces or stops episodes. For frequent or dangerous sleepwalking, doctors may recommend:

  • Cognitive behavioral therapy and hypnosis, which have shown benefit.
  • Medication such as low-dose benzodiazepines or certain antidepressants in severe cases.
  • Sleep studies to look for apnea or other disorders.

Helping a child who sleepwalks

Stay calm, keep the child's room and the route to the bathroom safe, and avoid discussing episodes in a way that makes them anxious or embarrassed. Most children grow out of it, and a consistent, early bedtime is usually the most effective step parents can take. Tell babysitters, relatives and sleepover hosts so they know what to do.

When to see a doctor

See a doctor if:

  • Sleepwalking is frequent or starts in adulthood
  • It involves dangerous behavior, injury or leaving the house
  • It causes daytime sleepiness
  • It's accompanied by snoring, gasping or other sleep symptoms
  • You act out dreams (possible REM sleep behavior disorder)
  • It began after starting a new medication

Sleepwalking vs similar conditions

ConditionKey difference
Night terrorsScreaming, intense fear, usually in children; also from deep sleep
Confusional arousalsConfused behavior in bed without walking
REM sleep behavior disorderActing out vivid dreams, often older adults; may remember dream
Nocturnal seizuresRepetitive, stereotyped movements; may involve tongue biting or incontinence

The bottom line

Sleepwalking happens when part of the brain wakes from deep sleep while awareness stays offline. It's common in children and usually outgrown. The biggest risks are injuries, so secure the home. Getting enough sleep, keeping a regular schedule, reducing stress and alcohol, and reviewing medications reduce episodes. See a doctor for frequent, dangerous or adult-onset sleepwalking.

Frequently asked questions

What causes sleepwalking?

Partial waking from deep sleep, triggered by sleep deprivation, irregular schedules, stress, alcohol, some medications, fever or other sleep disorders. Genetics play a big role.

Is it dangerous to wake a sleepwalker?

Not dangerous to them, but it can cause confusion or agitation. Gently guide them back to bed instead.

Can sleepwalking be cured?

Children usually outgrow it. In adults, treating triggers often helps, and therapy or medication can be used for severe cases.

Do sleepwalkers remember anything?

Usually not. Episodes occur during deep sleep when memory formation is switched off.

Can adults start sleepwalking?

Yes. Adult-onset sleepwalking is often linked to stress, sleep deprivation, alcohol, medications or sleep apnea.

How do I keep a sleepwalking child safe?

Use stair gates, lock doors and windows, avoid bunk beds, clear floors and keep sharp objects away.

Medical disclaimer: This article is for general educational purposes only and is not medical advice, diagnosis, or treatment. Persistent trouble sleeping, loud snoring, gasping at night, or heavy daytime sleepiness can signal a sleep disorder; talk with a qualified healthcare professional, especially if you have a health condition, take medication, or are pregnant. Never drive or operate machinery while drowsy.

Sources

  1. Cordani R et al. Somnambulism. Sleep Med Clin. 2024 (PMID 38368068)
  2. NHS – Sleepwalking
  3. MedlinePlus – Sleepwalking
  4. American Academy of Sleep Medicine – Sleepwalking (Sleep Education)