1. If you have the machine connected to the internet, what's probably happening is a Windows update. After the update, Windows usually reboots. From my understanding, the automatic update "feature" cannot be disabled, so the only way to stop it is to disconnect the machine from the network.
2. Sounds like there is a problem with windows settings. Set "Sleep" to "Never". Also, check on how to disable automatic updates.
For more details, please check the link from: