Windows 10 has a slightly annoying habit of randomly waking up from sleep. It's probably caused by your USB mouse, or something that pretends to be a USB mouse. Here's how to make it chill out and go to sleep.
You know the scenario - it's time to leave your PC alone for the night, so instead of shutting it down, you press the "Sleep" button on the case, or choose "Sleep" from the shutdown menu. The PC whirs away, goes to sleep and... wakes back up immediately.
This annoyance is probably caused by something pretending to be a mouse. No computer should be woken from hibernation by its mouse moving. Mice are too sensitive to random vibrations, or being knocked while tidying your desk. Here's how to make it behave.
powercfg -devicequery wake_armed
For each device that shouldn't wake the PC, type in the following
powercfg -disablewake "name of device here in the quotes"
For example, I have a device called "HID-compliant mouse (003)" which is part of my graphics tablet. I don't want my PC to wake up if the graphic tablet pen is moved near the screen. So I would type in
powercfg -disablewake "HID-compliant mouse (003)" to disable it. This seems a bit of a poor way to identify devices, it would have been better to do this based on USB vendor IDs, but it seems to work.