If it won't wake with the keyboard or mouse, turn on "Allow this device to wake the computer" for that device in Device Manager. If it wakes on its own, powercfg /lastwake in an admin command prompt tells you what woke it.

Buttons, not commands. PC Buster finds what opens ad pop-ups, clears junk and points to what is broken. Checks and cleanup are free.
Free downloadIt is often a graphics driver problem. First press Win + Ctrl + Shift + B (restarts the graphics driver), and if it happens often, reinstall the latest graphics driver from the maker. Until then, it is better to shut down instead of sleeping.
powercfg /lastwake shows the device that last woke it, and powercfg /waketimers shows scheduled wake-ups.PC Buster has no separate button for sleep settings. If you suspect a scheduled task is waking the PC at night, Manage Task Scheduler shows which program registered each task (free).
Find the cause of a blue screenComputer shuts down by itselfScreen flickering or black screenSecond monitor not detectedNo soundSpeakers cracklingKeyboard or mouse not workingWebcam not workingMicrophone not workingUSB not recognizedExternal drive not showing in File ExplorerGraphics card not being usedCheck hard drive or SSD healthCheck CPU and GPU temperatureCheck your PC specsCheck power-on and usage timeSee all fixes