I found this:
Here are the steps to get your external device (USB) charged even when the computer is in sleep mode
a. Click Start -> in the start search field type: Device Manager, press enter.
If you are prompted for access either press continue or supply the necessary username and password.
b. When Device Manager opens, expand the Universal Serial Bus controllers category.
c. Here you will see several USB Root Hub listings, for each right-click and select Properties.
d. In the properties window, click Power Management.
e. Uncheck ‘Allow the computer to turn off this device to save power’, click OK.
Repeat the same steps for all the other USB Root Hub entries.
also
Check Power options, Advanced settings - change plan settings, change advanced power settings, usb settings, usb selective suspend setting, and change to disabled