I recently bought a new laptop with Windows 8 on it and noticed that it was turning itself off if I wasn't using it for 20mins and it was plugged in. I had selected the Power Options so that I selected the option for the laptop to never go to sleep if the laptop was plugged in so I was confused why this was happening.
I knew the laptop was turning off rather than just going to sleep as my keyboard and mouse were not waking it up and the laptop was going through the boot sequence when I pressed the power button.
It turns out that Windows Hibernate was turned on by default and was overriding my default power options. Once I knew this it was easy to turn this feature off.