There was a time when the only device I needed to charge via my PC's USB ports was an iPod—later replaced by a smartphone. Now, I've got portable routers, an activity tracker, a mini Bluetooth speaker, and any number of other little gadgets that can suck juice straight out of my PCs USB ports.
It's probably the same situation for most people these days. The only problem is that if your PC goes to sleep, your charging capability often does too. One solution is to tell your computer to never go to sleep so your devices can continue charging, but that will waste a heck of a lot of power. A better solution is to make one tweak in your PC's settings to ensure that your charge-friendly USB ports are still supplying power when your PC goes to sleep.
Before you change anything, however, you should verify that your USB ports don't supply power when the computer is asleep. You may find that several USB ports—typically colored yellow—already do this, and even supply power when the computer is completely shut down.
To change your USB port's power settings, you need to open the device manager. In Windows 10, you do that by right-clicking Start and selecting Device Manager.
Click on the section that says Universal Serial Bus Controllers. When the listing expands, look for the items marked USB Root Hub. You may see one or several labeled USB Root Hub (xHCI). Those are typically your USB 3.0 ports. Right-click one of the hubs and select Properties. Click the Power Management tab and uncheck Allow the computer to turn off this device to save power. Click OK and you're done.
Now, when the PC is in sleep mode, you'll still be able to charge your devices. You may not want to change this setting on all your USB hubs and instead go with just one or two. There may also be some situations where even after tweaking settings your USB ports won't supply power. More often that not, however, changing these settings will do the trick.