Sleepwalking can be dangerous because the person is not in control of the situation and might do something dangerous and not have time to react.
Although the term is “sleepwalking,” that is actually a bit deceptive. People have been known to drive in their sleep, or even eat. Basically, we seem to do almost all of the things we can do when we are awake. Sleepwalking occurs in deep sleep, dreamless sleep without REM, about 1 to 2 hours after falling asleep.
A person who is sleepwalking risks getting into a difficult situation. For example, a person could sleepwalk right out of the house and into a street, where he or she could be hit by a car. Since sleepwalkers are also usually not dressed for the weather, sleepwalkers also risk danger from exposure. If you are wearing a nightgown and no shoes and there is snow on the ground, it is not good for you.
Sleepwalkers who drive can also get into terrible danger. Your reflexes are not going to be very good if your conscious mind is not alert. Also, you might drive yourself into danger.
Finally, sleepwalkers risk attacking others. Some people with night terrors sometimes fight off loved ones who are trying to help the sleepwalker wake up. A usually docile loved one can become dangerous in a sleepwalking trance.
In the end, any person who sleepwalks should see a doctor right away. There could be many causes for the disorder, and it can be very dangerous. People can also wake up exhausted from all their nightly activity, or gain weight from night-eating.