system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: What causes sleepwalking?
gpt
When you go to sleep, there is a part of your brain that turns off your muscles while you dream so you don't act out your dreams. Sometimes something can go wrong and your brain forgets to turn off your muscles. So your body just goes along with your dreams and you sleepwalk. 

This is also the same part of your brain that causes sleep paralysis, where you wake up but can't move. The dreams stopped, you woke up, but your brain hasn't flicked the switch to turn your muscles back on yet.