MS Windows
Windows 10 by default does automatic updates, even when it's in sleep mode and does a restart.
To prevent it from restarting in the sleep mode follow these steps:
That's it, next time your windows 10 won't restart any more but will ask you to schedule the updates if there are any.
Note: This has been tested on Microsoft Windows 10 home edition version 10.0.105886 build 10586