Sleepwalking is when someone walks or does other things while still asleep. Sleepwalking can happen for no reason, but it also can be triggered by stress, not getting enough sleep, illness, and certain medicines.
Sleepwalking is common in kids, and it usually goes away on its own by the teen years. Here's how to keep your child safe in case they sleepwalk and some ways to make sleepwalking less likely to happen.

Keep your child safe:
- Lock all windows and outside doors in your home each night before your child goes to sleep. If your child knows how to drive, put all car keys out of reach.
- Consider putting a safety gate across your child's bedroom door or installing an alarm that goes off when your child opens the door.
- Install safety gates that screw into the wall at the top of any stairs. Pressure-mounted gates are not safe at the top of stairs because they may come loose if someone pushes against them.
- Don't let your child sleep in a bunk bed.
- Remove sharp or breakable things from your child's bedroom.
- Keep dangerous objects (such as knives or matches) out of reach.
- Keep floors free of clutter and things your child could trip on.
If your child is sleepwalking:
- Stay calm. Reassure yourself that your child is OK.
- Sleepwalkers can be hard to wake up and may get frustrated if you try to reason with them. If your child isn't doing anything dangerous, gently guide them back to bed.
- If your child is doing something dangerous (such as picking up something sharp or walking outside of the house), try to remove the danger or move them to a safe space. It is OK to wake up your child to keep them safe. This will not hurt your child, but they may be very confused at first.
Follow your health care provider's instructions for:
- Whether you should gently wake your child 10–15 minutes before the time they usually sleepwalk. This can sometimes prevent sleepwalking.
- Stopping or changing any medicines that can cause sleepwalking.
- Making sure your child gets enough sleep. School-age kids need about 9–12 hours and teens need about 8–10 hours of sleep a night.
- Helping your child develop good bedtime habits, such as:
- Going to sleep and waking up at about the same times each day
- Having a relaxing bedtime routine where they listen to music or read before bed
- Avoiding caffeine for several hours before bed
- Avoiding screentime (including phone, computer, or other electronics) for at least 1 hour before bed
- Helping your child manage stress by being physically active, making time for activities they enjoy, practicing relaxation techniques like meditation and deep breathing, and eating a well-balanced diet.

Why does sleepwalking happen? Sleep happens in several stages. As a child moves from the deepest stage of sleep to a lighter stage, some parts of the brain can become more active. When this happens, a child may sleepwalk. Sleepwalking tends to run in families.
What happens when someone sleepwalks? Most kids sleepwalk within an hour or two of falling asleep. They may sleepwalk for just a few seconds or for 10 minutes or more. Besides walking in their sleep, sleepwalkers might talk, sit up in bed, run, eat, climb out windows, or even try to drive a car. Their eyes may be open, but they are not awake. They usually won't respond when spoken to and don't remember the sleepwalking when they wake up.