For most, sleep is when our bodies rest and recover. At most, we toss and turn. For some, however, they get out of bed and walk around, even though they're still sleeping. In rare cases, they may even drive a car or cook a meal.
About 30 percent of adults in the U.S. have reported a history of sleepwalking. The cause of sleepwalking, also called somnambulism, is unknown. It most frequently occurs in children, regardless of gender. The rate of children who sleepwalk is as high as 17 percent. It can occur as soon as the child can walk, and usually peaks by the time the child is eight to 12 years old.
We also know sleepwalking happens during the deepest stages of sleep. The deepest stages of sleep are stages 3 and 4. Your brainwaves are the slowest during this time. Most dreams occur in REM when the brain is much more active. Your muscles are temporarily paralyzed during this time so you don't act out your dreams. Thus, most sleepwalking occurs in other stages since you can't walk if your muscles are paralyzed.
It's very difficult to wake up someone while they're sleepwalking because they're in such a deep stage of sleep. If you do wake them up, they're going to be incredibly confused as to why they're out of bed. Thus, while it's not dangerous to wake a person up, be prepared to have an explanation.
sources: Life Noggin, LiveScience