If your computer is having issues with Windows 10, or Windows 8, going into sleep mode on it's own, this is the answer for you, I have currently had the same issue, Here is a tutorial upon how to fix it.
1. Click on the windows icon
2. Type regedit
3. Right-click on regedit icon, click Run as...