When the body goes through these cyclic periods while asleep, they are done in 5 cycles that take us from sound sleeps to those that have dreams as a part of the cycle. Sleepwalking happens during stages 3 and 4, where a person can wake up from bed and walk around the house, or even leave home to aimlessly perform activities.