Health Conditions A-Z Sleep Disorders What Causes Sleepwalking (Somnambulism)? By Francisco J. Rivera Rosario Francisco J. Rivera Rosario Francisco J. Rivera Rosario is a science communications editor experienced in developing all types of science content including, scientific journal articles, infographics, medical educational videos, medication FAQ documents, and more. health's editorial guidelines Published on February 18, 2024 Medically reviewed by Valerie Cacho, MD Medically reviewed by Valerie Cacho, MD Valerie Cacho, MD, is a board-certified sleep medicine specialist and the founder of the online educational company Sleephoria. learn more Close Filmstax / Getty Images Sleepwalking is a condition that causes a person to get up and move while asleep and semiconscious, not fully aware of their surroundings. Sleepwalking, or somnambulism, is one of a larger group of sleep disorders known as parasomnias—unusual behaviors or perceptions during sleep. Episodes generally last from a few minutes to half an hour and may involve activities like walking, going to the bathroom, moving furniture, getting undressed, and leaving the house. Sleepwalking happens during a stage of non-rapid eye movement (NREM) sleep called N3 sleep. N3 sleep is a stage of deep sleep with a high arousal threshold, meaning it's difficult to be woken up. Researchers do not know what exactly causes sleepwalking. Possible factors include a lack of sleep, stress, and fever. Sleepwalking is much more common in children, and some studies suggest that genetics might play a role. What Causes Sleepwalking? Many factors can trigger sleepwalking. Researchers don't yet fully understand how these factors trigger the mechanisms of sleepwalking. Sleep Deprivation Sleep deprivation (lack of sleep) is one of the main causes of sleepwalking—particularly going more than 24 hours without sleep. Research shows that behaviors during sleepwalking episodes become more complex after sleep deprivation. Sleeping after a long period with no sleep causes you to spend more time in N3 sleep. N3 sleep is considered the deepest stage of sleep. This stage is involved in repairing bone and muscle tissue and developing your immune system. Spending more time in N3 sleep makes it more difficult for you to wake up and therefore more likely to experience a sleepwalking episode. Sleep deprivation also often contributes to fatigue and feelings of anxiety, both of which are associated with sleepwalking. Fever Fever is another common trigger for sleepwalking. Researchers believe that, like sleep deprivation, fever can cause sleepwalking because you spend more time in the N3 stage when you have a fever. Medications There have been many reported cases of medications causing sleepwalking episodes in people with no prior history of sleepwalking. Ambien (zolpidem) in particular—a medication prescribed to treat insomnia—has been shown to cause sleepwalking and other undesirable sleep behaviors. Other medications that can trigger sleepwalking events include: Benzodiazepines: A class of medications used to treat conditions like anxiety, muscle spasms, and seizures Lithium: Used to treat mental health conditions like bipolar disorder Selective serotonin reuptake inhibitors (SSRIs): A class of antidepressant medications Quinine: Used to treat malaria Beta-blockers: A class of medications used to treat hypertension (high blood pressure) These medications affect how sleep patterns are regulated in the brain. Alcohol has also been associated with sleepwalking because it can disrupt sleeping patterns. However, no controlled clinical trials have been able to confirm alcohol's involvement in sleepwalking. Increased Arousal Sleep Disorders Arousal disorders are medical conditions that cause you to wake up abruptly throughout the night. These disorders affect the sleep cycle and are common triggers for sleepwalking. They include: Obstructive sleep apnea: A chronic sleep disorder that causes repeated breathing disruptions while you sleep Restless legs syndrome (RLS): A sleep and neurological sensory condition (related to your brain and spinal cord) that causes urges to move your body due to unusual sensations in your legs Gastroesophageal reflux disease (GERD): A gastrointestinal disorder that occurs when your stomach acid repeatedly flows back into your esophagus (the tube that carries food from your mouth to your stomach) Brain Disorders Some studies suggest that brain disorders or conditions can contribute to sleepwalking episodes, though more research is needed in this area. Documented neurological conditions associated with sleepwalking include: Acute head injuries Encephalitis (brain inflammation) Migraine Is Sleepwalking Hereditary? Research suggests a genetic component of sleepwalking. For example, one longitudinal study of over 2,000 children found that sleepwalking was almost twice as likely in children who had at least one parent with a history of sleepwalking. This likelihood increased if both parents had a history of sleepwalking. Other studies highlight that sleepwalking is common in twins. Researchers have also looked into identifying specific genes. Genome mapping studies focus on identifying genes on chromosomes. Some research suggests that DQB1*0501 genes are involved in parasomnia sleep disorders like sleepwalking confusional arousal and night terrors. Researchers still don't exactly know how the DQB1 gene is linked to sleepwalking. The DQB1 gene family is involved in making proteins for immune system cells and might play a role in conditions like: Celiac disease: A chronic (long-term) autoimmune disorder that happens when your immune system has a reaction to eating gluten Narcolepsy: A chronic sleep disorder that interferes with your brain’s ability to control the body’s sleep-wake cycles Diabetes: A chronic disease that occurs when you have higher than normal levels of blood glucose (blood sugar) Populations in these research studies included mostly white subjects. More research is needed to determine the hereditary aspects of sleepwalking in various populations. Who Sleepwalks? Sleepwalking is much more common in children than in adults. It occurs in approximately 5% of children (ages 2-18) and commonly decreases in frequency as children get older. During early childhood, proper sleep cycles are not yet completely regulated. N3 sleep decreases as people get older making it less likely for adults to experience sleepwalking episodes. Gender doesn't seem to play a role in sleepwalking. Risk Factors Risk factors increase a person's likelihood of experiencing sleepwalking. Risk factors for sleepwalking include: A family history of sleepwalkingBeing between the ages of 8-12Sleep deprivation (especially if it extends beyond 24 hours)Taking medications like antidepressants, benzodiazepines, lithium, antipsychotics, and SSRIsHaving another sleep disorder, such as restless legs syndrome or obstructive sleep apneaA recent head injuryMigraines A Quick Review Sleepwalking is a sleep disorder that causes you to walk around and do other activities while asleep. Sleep deprivation, fever, and medications might trigger sleepwalking. Medical conditions like sleep apnea, restless leg syndrome, brain injuries, and stroke have also been associated with sleepwalking episodes. Sleepwalking mostly affects school-aged children and typically becomes less frequent over time. It appears to run in families, and researchers have identified a specific gene that appears to play a role. More research is needed to determine the hereditary factors of sleepwalking in more diverse populations. Was this page helpful? Thanks for your feedback! Tell us why! Other Submit 15 Sources Health.com uses only high-quality sources, including peer-reviewed studies, to support the facts within our articles. Read our editorial process to learn more about how we fact-check and keep our content accurate, reliable, and trustworthy. MedlinePlus. Sleepwalking. Patel AK, Reddy V, Shumway KR, Araujo JF. Physiology, sleep stages. In: StatPearls. StatPearls Publishing; 2024. Zergham AS, Chauhan Z. Somnambulism. In: StatPearls. StatPearls Publishing; 2023. Morse AM, Kotagal S. Parasomnias of childhood, including sleepwalking. In: Chervin RD, Hoppin, AG. UpToDate. UpToDate; 2023. Palagini L, Bianchini C. Pharmacotherapeutic management of insomnia and effects on sleep processes, neural plasticity, and brain systems modulating stress: A narrative review. Front Neurosci. 2022 Jul 29;16:893015. doi:10.3389/fnins.2022.893015 Castelnovo A, Lopez R, Proserpio P, et al. NREM sleep parasomnias as disorders of sleep-state dissociation. Nat Rev Neurol. 2018 Aug;14(8):470-481. doi:10.1038/s41582-018-0030-y Singh S, Kaur H, Singh S, et al. Parasomnias: A comprehensive review. Cureus. 2018;10(12):e3807. doi:10.7759/cureus.3807 Viola-Saltzman M, Musleh C. Traumatic brain injury-induced sleep disorders. Neuropsychiatr Dis Treat. 2016;12:339-348. doi:10.2147/NDT.S69105 Blattner MS, Day GS. Sleep disturbances in patients with autoimmune encephalitis. Curr Neurol Neurosci Rep. 2020;20(7):28. doi:10.1007/s11910-020-01048-0 Tiseo C, Vacca A, Felbush A, et al. Migraine and sleep disorders: A systematic review. The Journal of Headache and Pain. 2020;21(1):126. doi:10.1186/s10194-020-01192-5 Petit D, Pennestri MH, Paquet J, et al. Childhood sleepwalking and sleep terrors: A longitudinal study of prevalence and familial aggregation. JAMA Pediatr. 2015;169(7):653-8. doi:10.1001/jamapediatrics.2015.127 Heidbreder A, Frauscher B, Mitterling T, et al. Not only sleepwalking but NREM parasomnia irrespective of the type is associated with HLA DQB1*05:01. J Clin Sleep Med. 2016;12(4):565-70. doi:10.5664/jcsm.5692 MedlinePlus. HLA-DQB1 gene. Stallman HM, Kohler M. Prevalence of sleepwalking: A systematic review and meta-analysis. PLoS One. 2016;11(11):e0164769. doi:10.1371/journal.pone.0164769 Patel AK, Reddy V, Shumway KR, et al. Physiology, sleep stages. In: StatPearls: StatPearls Publishing; 2023.