I am having a similar issue although this is just affecting my mouse. At random times, even while actively using my computer, the mouse pointer will either freeze or vanish on the screen. The mouse will work again if I remove and reinsert the USB plug into the USB port or go into Device Manager and remove the mouse (and select uninstall driver) under Human Interface Devices. Plugging the mouse directly into the motherboard USB port doesn't seem to help (as opposed to plugging it into a USB hub).
Checking the Windows System log, I see the following info:
Driver exit RTD3.
All the connected devices will now cause DeviceConnected events.
The system session has transitioned from 10 to 12.
Reason InputAccelerometer
BootId: 30
These events line up with the time that the mouse stops working.
Hopefully, this points to the cause of the mouse not working.