Try going into "Control Panel" then "Power Options". Click on "Change plan settings" next to the one you are using and then, on the next screen click "Change advanced power settings".
In this new window search through the listed option, especially the 'Sleep' and 'USB' ones, but I would check all to be safe, to make sure that nothing has been changed to cause it to sleep. Once you have made all the changes you wish to, click "Apply" and then "OK". You can then close both windows.