The phenomenon of somnambulism, commonly known as sleepwalking, has long occupied a space between medical curiosity and cultural mystery. While it has been immortalized in literature through the haunting movements of Lady Macbeth and cited in modern courtrooms as a defense in complex criminal cases, the biological origins of sleepwalking remained largely speculative until recently. New research into human evolution suggests that our ability to walk, navigate, and even perform complex tasks while remaining in a deep state of unconsciousness is not a functional adaptation, but rather a unique "evolutionary glitch" permitted by the specific way our ancestors transitioned from sleeping in trees to sleeping on the ground.
The Biological Mechanics of State Dissociation
Sleepwalking is classified by medical professionals as a parasomnia—a category of sleep disorders that involve abnormal movements, behaviors, emotions, perceptions, or dreams. According to Dr. David R. Samson, an associate professor of evolutionary anthropology at the University of Toronto and author of The Sleepless Ape: The Story of Sleep in Human Evolution, sleepwalking occurs primarily during deep non-rapid eye movement (NREM) sleep. This stage, often referred to as slow-wave sleep, is the period when the body is at its most restful and the brain is least responsive to external stimuli.
The condition is defined by what Samson calls "state dissociation." In a typical sleep cycle, the brain maintains a clear boundary between wakefulness and sleep. However, during a sleepwalking episode, this boundary collapses. Parts of the brain responsible for motor control and arousal—the circuits that allow us to stand and walk—become active, while the regions governing reflective awareness, executive judgment, and memory formation remain in a profound state of slumber.
This neurological split explains why sleepwalkers can navigate stairs, open doors, and avoid furniture with eerie precision, yet remain entirely oblivious to their surroundings and retain no memory of the event upon waking. From a clinical perspective, the body has effectively "outrun" the waking mind.
An Evolutionary Transition: From Arboreal Nests to Ground-Based Shelters
To understand why humans sleepwalk while other primates do not, researchers point to a pivotal shift in the chronology of human evolution. For millions of years, our primate ancestors were arboreal sleepers. Great apes, such as chimpanzees, orangutans, and gorillas, build elaborate sleeping platforms or "nests" high in the forest canopy to avoid ground-based predators.
In this arboreal environment, the evolutionary stakes for sleep behavior were absolute. A primate that experienced a "state dissociation" and attempted to walk while asleep would almost certainly fall from the tree. In the unforgiving logic of natural selection, such a trait would be lethal, ensuring that any genetic predisposition toward sleepwalking was swiftly removed from the gene pool. This "severe selection" pressure effectively mandated that sleep remain a state of near-total physical stillness.

The transition for hominids began approximately two million years ago, likely with Homo erectus. As our ancestors mastered the use of fire and began to live in larger, more cohesive social groups, they moved their sleeping sites from the canopy to the ground. This shift was fundamental to the development of the human brain, as ground sleeping allowed for deeper, higher-quality REM sleep, which is critical for cognitive processing and memory consolidation. However, it also removed the immediate physical danger associated with movement during sleep.
The Concept of Relaxed Selection and the Human "Sleep Shell"
The persistence of sleepwalking in the human population is a prime example of what biologists call "relaxed selection." This occurs when an environmental change removes the pressure that previously kept a specific trait or "glitch" in check. Once humans began sleeping on the ground, the penalty for standing up during the night was no longer death by falling.
Samson argues that humans developed a "sleep shell"—a protective environment created by socially buffered camps, the presence of fire to deter predators, and shared vigilance among tribe members. Within this shell, a sleepwalker might wander a few meters or interact with their bedding without facing a life-threatening consequence. Because the environment shielded these individuals, the "glitch" of state dissociation was allowed to persist across generations.
"Selection would be severe for a gorilla in a tree," Samson notes, "but in the human sleep shell, the immediate penalty of getting up from sleep may have been reduced." Consequently, sleepwalking is not an adaptation that provides a survival advantage; it is a vestigial error in our neurological wiring that our ancestors’ social structures simply allowed us to survive.
Statistical Prevalence and the Genetic Blueprint of Somnambulism
Modern data supports the theory that sleepwalking is deeply embedded in human biology, though its prevalence varies significantly by age. Current estimates suggest that approximately 5 percent of children and 1.5 percent of adults experience regular sleepwalking episodes. The higher frequency in children is attributed to the fact that their brains are still maturing and they spend a greater proportion of the night in the deep NREM sleep where these episodes occur.
Research into the heritability of the condition suggests a strong genetic component. A longitudinal study published in JAMA Pediatrics tracked the sleep patterns of children and their parents, revealing a clear familial link:
- Children with no family history of sleepwalking have a 22 percent chance of developing the condition.
- Children with one parent who sleepwalks have a 47 percent chance.
- Children with two parents who sleepwalk have a 61 percent chance.
While scientists have yet to identify a single "sleepwalking gene," the data indicates that the predisposition for deep-sleep arousal is an inherited trait. It appears to be a specific knack for entering a sleep state so profound that the transition back to wakefulness becomes "stuck," leaving the individual suspended between two worlds.

Comparative Zoology: Why Pets Don’t Sleepwalk
The question of whether other animals sleepwalk often arises from observing domestic pets. Dog owners frequently report their pets "running" in their sleep, characterized by paddling paws and muffled barks. However, researchers clarify that this is not sleepwalking. These movements typically occur during REM sleep, the stage associated with dreaming, and are the result of minor failures in the brain’s ability to paralyze the muscles (REM atonia).
True sleepwalking—involving the complex coordination required to stand, walk, and navigate obstacles—has not been documented in non-human species. While a dog might twitch at an imaginary squirrel, it does not rise and wander into the kitchen to find its bowl while unconscious. This reinforces the theory that the specific combination of human neurobiology and our history of ground-based, socially protected sleep is unique in the animal kingdom.
Medical Triggers and Modern Implications
While evolution explains why we can sleepwalk, modern medicine identifies the triggers that cause specific episodes. In a contemporary context, the "sleep shell" has been replaced by bedrooms, but the underlying neurological vulnerability remains. Several factors can increase the likelihood of an episode by deepening NREM sleep or causing partial arousals:
- Sleep Deprivation: When the body is starved of rest, it compensates by dropping into a much deeper "rebound" NREM sleep, increasing the risk of dissociation.
- Stress and Anxiety: High levels of cortisol can disrupt the smooth transition between sleep stages.
- Medications: Certain sedative-hypnotics, most notably Zolpidem (Ambien), have been linked to complex sleep behaviors, including "sleep-driving" and "sleep-eating."
- Obstructive Sleep Apnea (OSA): The physical struggle to breathe can trigger a partial brain arousal that activates motor circuits without waking the conscious mind.
From a legal and social standpoint, these episodes can have profound consequences. There are documented cases where individuals have committed acts of violence or traveled long distances while sleepwalking, leading to "non-insane automatism" defenses in court. These cases highlight the terrifying reality of the condition: the body is capable of complex, seemingly purposeful action while the "self" is entirely absent.
Broader Impact and Evolutionary Analysis
The study of sleepwalking offers more than just a medical explanation for a strange behavior; it provides a window into the evolution of human vulnerability. Our ability to survive despite such a significant neurological flaw is a testament to the power of human social structures. For the majority of our history, our safety was not a product of our individual physical prowess, but of our collective vigilance.
The "Sleepless Ape" theory suggests that humans have sacrificed the "hard-wired" safety of animal sleep for a more flexible, socially dependent system. While this left us prone to glitches like somnambulism, it also facilitated the cognitive leaps that define our species.
In conclusion, sleepwalking remains a vivid reminder of our transition from the trees to the ground. It is a biological relic of a time when we first began to trust the fire and the tribe to keep us safe while our minds wandered. While it may appear unsettling or humorous in a modern context, it is ultimately a signature of the unique evolutionary path that allowed humans to move out of the canopy and into the world.




