A couple of things to try if your USB ports stop working:
Control panel > power options > change plan settings(change the active one) > change advanced power settings > USB settings > disable
Control panel > device manager > universal serial bus controllers > go through the usb devices right clicking each one(probably just the “usb root hub” ones though), some will have a power management tab, uncheck “allow computer to turn off this device to save power”
Run the hardware and devices troubleshooter and see if it finds anything.
1. Go to Control Panel\All Control Panel Items\Troubleshooting\Hardware and Sound
2. Click on Hardware and Devices to start the troubleshooter.
If the troubleshooter solves the problem, you’re good to go. If it doesn’t, proceed with the next method.
Go to device manager and remove all USB ports, root hubs, etc.
1. Open Device Manager by clicking the Start button, clicking Control Panel, clicking System and Maintenance, and then clicking Device Manager. If you are prompted for an administrator password or confirmation, type the password or provide confirmation.
2. Expand Universal Serial Bus Controllers.
3. Remove the root hubs and universal host controllers listed there.
To do so:
a) Right-click on the entry and select properties.
b) Go to driver tab and click uninstall.
Do this for all the entries.
4. Once you’re through with this, restart your computer.
Reboot and see if Windows redetects them. If it does, the drivers should be automatically reinstalled.