This happens when they come out of what is known as stage IV NREM sleep. Sleepwalking episodes last from 30 seconds to 30 minutes and occasionally longer. Advances in sleep research include the development of the polysomnograph, which allows researchers to study the brain waves of sleepers. Researchers have found that during sleepwalking episodes, sleepwalkers exhibit mixtures of brain-wave patterns, including those typically found in deep sleep, in the transition to waking, and in drowsy and waking states. Although the sleepwalker's body is able to move, the person's brain is not fully awake.
Sleepwalkers are clearly capable of quite complex tasks.
Peter Fenwick, a sleep researcher at London's Institute of Psychiatry, has sleepwalking patients who have ridden horses, made breakfast, stripped wallpaper and repaired refrigerators. Sleepwalkers can have conversations, albeit disjointed ones. A quick perusal of back issues of the medical journal Sleep reveals tales that are by turn puzzling, hilarious and frightening. Not all sleepwalking episodes are chuckle-worthy. Dr. Clete Kushida, a sleep researcher at Stanford Medical School, estimates a 60 to 70 percent risk of injury during sleepwalking incidents.