Why Do We Sleepwalk?

A young child in pajamas stands beside an unmade bed in a dark bedroom at night, lit by moonlight from the window, eyes open but still asleep

Imagine waking up in the middle of the night to find someone in your house walking around with their eyes open — but fast asleep. They might wander into another room, open a door, or even try to eat something. When you speak to them, they stare blankly or mumble, and in the morning they remember nothing at all.

This is sleepwalking, and it is far more common — and far less mysterious — than the stories about it suggest. It is not acting out a dream, and the person is not possessed or in danger from being asleep. It is a glitch in the way the brain wakes up from its deepest sleep.

Quick answers

  • What is sleepwalking?: Sleepwalking happens when the brain partly wakes from deep sleep — the parts that move the body switch on, while the parts that create awareness and memory stay asleep.[1]
  • Is it dreaming?: It happens in deep, dreamless sleep, usually in the first third of the night, not during dreaming sleep.[1]
  • Is it dangerous?: Occasional sleepwalking, especially in children, usually needs no treatment and most children outgrow it.[2] The real risk is injury during an episode, which is why the bedroom needs to be made safe.

What sleepwalking actually is

Sleepwalking has the medical name somnambulism. It belongs to a family of sleep behaviours called parasomnias — unwanted behaviours that happen during sleep or while falling asleep or waking up.[1]

During an episode, a person gets up and moves around while still asleep. Their eyes are usually open, but their face is blank and staring. They are hard to wake, relatively unresponsive to other people, and afterwards they usually remember little or nothing about what happened.[1]

It is not rare. A large review of 51 studies estimated that about 6.9% of people sleepwalk at some point in their lives. In the past year, about 5.0% of children and 1.5% of adults had episodes.[3] Other surveys put the figures higher for children — up to around 17% — but the pattern is consistent everywhere: children sleepwalk far more than adults.

Why it happens in deep sleep

To understand sleepwalking, you need to know that sleep is not one uniform state. It cycles through stages, including light sleep, deep sleep, and dreaming sleep (REM sleep). Deep sleep — called slow-wave sleep or stage N3 — is the deepest, most restorative stage, and it dominates the first third of the night.

Sleepwalking is a disorder of partial arousal from this deep sleep. Something disturbs the sleeper, but the brain does not wake up evenly. The motor areas — the parts that control movement — become active enough to walk, open doors, and even perform routine tasks. Meanwhile the prefrontal cortex, the part responsible for conscious awareness, judgment, and laying down memories, stays deeply asleep.[3]

That split explains almost everything strange about sleepwalking: the open eyes with no one home, the ability to move combined with total confusion, and the missing memory the next morning. The body is up; the mind is not.

Why children sleepwalk more than adults

Children are the classic sleepwalkers for two reasons. First, they spend a much larger share of the night in deep slow-wave sleep than adults do, so they have far more opportunities for a partial arousal to happen. Second, the brain systems that keep sleep and waking clearly separated are still maturing in childhood.[3]

That is also why most children simply outgrow it. As they grow older, deep sleep takes up less of the night, and the episodes fade — usually by the teenage years.[2] In adults, episodes are less common but can matter more, because adult episodes carry a higher risk of injury and are more often linked to medicines or other sleep problems.[3]

Sleepwalking also runs in families. Studies have found that a child’s risk roughly triples if one parent sleepwalked, and is higher still if both parents did.[3] Genes do not guarantee it — they only raise the odds that the brain’s waking system will be a little uneven.

What triggers an episode?

Most people who sleepwalk do not do it every night. Episodes cluster around certain triggers, and the same triggers come up again and again in the research:

  • Sleep deprivation. A very tired brain rebounds into deeper sleep, and

deeper sleep means more chances of a partial arousal. Sleeping far less than usual, or keeping irregular hours, is one of the strongest triggers.[3]

  • Stress and anxiety. Stress fragments deep sleep and raises arousal

hormones, which destabilises the boundary between sleep and waking.

  • Fever and illness. A raised temperature disrupts sleep architecture,

which is one reason children — who get fevers more often — sleepwalk more.

  • Alcohol. Alcohol changes the balance of sleep stages and increases

deep sleep early in the night.

  • Other sleep disorders. Obstructive sleep apnoea, which causes repeated

tiny arousals through the night, can trigger episodes in adults. Treating the apnoea sometimes stops the sleepwalking entirely.

  • Certain medicines. Some medicines have been linked to episodes in

people with no previous history, including some sleep medicines such as zolpidem, as well as some antidepressants and other drugs.[3]

Notice what these triggers have in common: they all make deep sleep either deeper, more broken, or harder to wake from cleanly.

What does a sleepwalker actually do?

Episodes usually begin in the first part of the night, often 1 to 2 hours after falling asleep.[1] The person may sit up in bed, speak unclearly, get up, and walk around the house. Most episodes are brief — often just a few minutes.

What they do varies. Many episodes are simple: walking to another room, opening a door, standing in a hallway. Some are more elaborate: getting dressed, eating, moving objects around the house. The actions look purposeful, but they are semi-automatic — the person is not thinking, planning, or remembering.

Sleepwalkers can also be clumsy and confused. They may bump into furniture, trip, or try to climb out of a window or leave the house. They rarely respond sensibly to questions, and if woken suddenly they are disoriented and may be frightened or upset. That confusion, plus the risk of wandering somewhere unsafe, is the real problem — not the sleepwalking itself.

Is sleepwalking dangerous?

The sleepwalking itself is not dangerous to the brain. The danger is what the body can do while the mind is offline: falling down stairs, tripping, walking out of the house, or in rare cases jumping from a window.[1] Adults, whose episodes can involve more forceful movement, face the highest injury risk.

Occasional episodes in a child, in a safe bedroom, are usually nothing to worry about. The risk rises with frequency, with dangerous behaviour, and with episodes that start for the first time in adulthood — all of which are reasons to talk to a doctor (see below).

It is also worth saying what sleepwalking is not. It is not a sign of mental illness, and it is not something a person can control or be blamed for. A child who sleepwalks is not being naughty, and an adult who sleepwalks is not “acting strange” on purpose.

Should you wake a sleepwalker?

You have probably heard the old warning: never wake a sleepwalker. The truth is more reassuring. Waking a sleepwalker will not harm them, give them a heart attack, or trap them in some in-between state. Those are myths.

But waking them suddenly is still not the best move. A person woken abruptly from deep sleep is confused, does not know where they are, and may be scared or angry. The recommended approach is gentler: guide them back to bed. Speak calmly, take them lightly by the arm, and steer them back. Most sleepwalkers will settle back into bed without fully waking.[2]

If you do need to wake them — for example, if they are heading somewhere unsafe — wake them gently, not with a shout or a shake. Give them a moment to work out where they are, and do not expect a sensible conversation. They will usually fall back asleep quickly and remember nothing in the morning.

How to make the home safe

Because episodes are unpredictable, safety is about the environment, not about watching the person all night. The standard advice is simple and practical:[2]

  • Keep doors and windows locked at night, and consider a door alarm.
  • Use a stair gate for children, and keep the floor clear of clutter and

tripping hazards.

  • Do not let a child who sleepwalks sleep in the top of a bunk bed.
  • Keep car keys and anything dangerous out of easy reach.
  • If episodes are frequent, a bedroom on the ground floor removes the

stair risk entirely.

These steps do not stop sleepwalking, but they remove almost all of the injury risk — which, for most families, is the whole problem solved.

Can you prevent sleepwalking?

There is no guaranteed cure, and most cases do not need one. But because episodes follow triggers, reducing the triggers usually reduces the episodes:[2]

  • Keep a regular sleep schedule. Go to bed and get up at the same times

every day, and get enough sleep. This is the single most effective step.

  • Manage stress. A calmer wind-down routine before bed — dim lights, no

screens, no heavy arguments — helps deep sleep stay stable.

  • Avoid alcohol and caffeine in the evening. Both disturb the balance

of sleep stages.

  • Keep a sleep diary. Note bedtimes, sleep quality, stress, caffeine,

alcohol, and whether an episode happened. Patterns usually show up within a couple of weeks, and a diary is also exactly what a doctor will ask for if you ever seek help.[4]

For children, one more technique is sometimes used: scheduled waking. If episodes happen at a predictable time, a parent gently wakes the child about 15 minutes before that time for a few nights, which can break the pattern. Ask a doctor before trying it, since it disturbs the child’s sleep too.

If episodes are frequent, dangerous, or linked to another condition, a sleep clinic can help. Treatment options include talking therapies such as cognitive behavioural therapy, and in some cases medicines — but medicines are only used when other approaches have not worked.[2] Never stop a prescribed medicine because of sleepwalking without talking to a doctor first.

Sleepwalking, night terrors, and acting out dreams — what’s the difference?

Three things are often confused, and telling them apart matters:

  • Sleepwalking comes from deep, dreamless sleep in the first part of the

night. The person moves around calmly, eyes open, and remembers nothing.

  • Night terrors also come from deep sleep, and also mostly affect children.

The difference is drama: the child sits up screaming, looks terrified, and cannot be comforted — but is still asleep and remembers nothing in the morning. Night terrors and sleepwalking often run in the same families.

  • REM sleep behaviour disorder is different again. It happens during

dreaming sleep, when the body is normally paralysed so dreams cannot be acted out. When that paralysis fails, people punch, kick, or shout out their dreams. It mostly affects older adults and is a separate condition that always deserves a doctor’s attention.

If the episodes involve violent thrashing, shouting out dreams, or acting out a dream story, that points away from ordinary sleepwalking and towards the third category — mention it to a doctor.

When should you see a doctor?

Occasional sleepwalking is usually not a cause for concern, and you can simply mention it at a routine check-up. But see a doctor if the episodes:[1]

  • Happen often — for example, more than 1 to 2 times a week, or several

times a night.

  • Lead to dangerous behaviour or injuries, to the sleepwalker or to others.
  • Disturb the sleep of the household or the sleepwalker.
  • Leave the person very tired during the day or cause problems at school

or work.

  • Continue into your child’s teenage years.
  • Start for the first time in adulthood.

Adult-onset sleepwalking deserves particular attention, because it is more often linked to medicines, sleep apnoea, or other medical conditions.[3] A doctor may refer you to a sleep clinic, where an overnight sleep study can show exactly what is happening during the night.

Flowing teal bands on a dark background illustrating sleep cycles, with deep sleep dominating early in the night and REM sleep increasing later
Sleep cycles move through deep sleep early in the night and more REM sleep later on. (CAVELYRA Visual Archive)

Key Takeaways

  • Sleepwalking is a partial waking from deep, dreamless sleep: the body moves

while awareness and memory stay asleep.

  • It is most common in children, who spend more of the night in deep sleep,

and most children outgrow it by their teenage years.

  • The main triggers are sleep deprivation, stress, fever, alcohol, irregular

sleep hours, sleep apnoea, and some medicines.

  • The risk is injury during an episode, not the sleepwalking itself — so a

safe bedroom matters more than watching all night.

  • Do not wake a sleepwalker suddenly; gently guide them back to bed instead.
  • See a doctor if episodes are frequent, dangerous, start in adulthood, or

disrupt daytime life.

Conclusion

Sleepwalking looks alarming, but the explanation is simple and almost reassuring: the brain wakes up unevenly, leaving the body on autopilot for a few minutes. For most children it is a passing phase, and for most adults it is an occasional quirk made safe by a locked door, a clear floor, and a regular bedtime.

The moments that matter are the exceptions — frequent episodes, injuries, or sleepwalking that starts for the first time as an adult. Those are worth a conversation with a doctor. Everything else is just the brain, doing its night-time work a little out of sync.

Explore more evidence-informed explanations in CAVELYRA’s Body & Health collection.

References

[1] Mayo Clinic. “Sleepwalking: Symptoms and Causes.” https://www.mayoclinic.org/diseases-conditions/sleepwalking/symptoms-causes/syc-20353506?p=1

[2] NHS 111 Wales. “Sleepwalking.” https://111.wales.nhs.uk/Sleepwalking/

[3] StatPearls. “Somnambulism.” (Summary of prevalence research, including the systematic review and meta-analysis of 51 studies by Stallman and colleagues, and evidence on genetic predisposition and medicine triggers.) https://www.statpearls.com/ArticleLibrary/viewarticle/29231

[4] Mayo Clinic. “Sleepwalking: Diagnosis and Treatment.” https://www.mayoclinic.org/diseases-conditions/sleepwalking/diagnosis-treatment/drc-20353511?p=1

Keep Reading

A calm bedroom at night with a bed made with white bedding and a glowing round night light on the bedside table
A calm, safe bedroom at night, with a soft night light glowing beside the bed. (CAVELYRA Visual Archive)

By CAVELYRA Editorial

Written and researched by the CAVELYRA editorial team. We turn complex ideas about the brain, the body and the universe into clear, everyday explanations — every article researched from trusted scientific sources, with no jargon and no hype.