How Do I Wake Up My Computer From Sleep?
Don’t press and hold the power button, or it will shut down the computer.
Why Won’t My Computer Come Out of Sleep Mode?

Keyboard properties in Windows Device Manager.
The above steps don’t always work.
Turning that on should make the keystroke wake-up method work.
You really have just a few options:
Reboot the computer.

Look for a power button along the bottom or top of the screen, and choose theRestartorShut downoption.
Check the power source.
Be sure to check every power source relevant to your situation, including any battery backup systems.

Sleep-related problems can arise if important updates are missing.
Learnhow to update Windowsandhow to update macOSfor directions.
When you do that, you’re free to choose toneverhave your PC fall asleep.
For a quick way to see which devices support waking the computer, enterpowercfg -devicequery wake_from_anyin a Command Prompt.
The resolution here could be to change theMultimedia prefs>When sharing mediasetting to beAllow the computer to sleep.
you’re able to find this in the same Power Options area as the above solution.
Enter BIOSand disable theBlock Sleepoption for USB devices.
It should be listed in a power-related menu, such asPower Management>USB Wake Support.
For more detailed information, check outHow to Prevent a Mac From Going to Sleep.
FAQ
Background tasks may stop your system from staying asleep.
Other possible causes are wake timers, scheduled tasks, and internet communications.
First, try closing any open apps.
you’re free to also check for wake timers in your box’s power configs.
Finally, try turning off Wi-Fi to stop communications from waking up your system.
On a Mac, pressOption+Command+Eject.
The keyboard shortcutControl+Command+Qalso works for both Macs and MacBooks.