Be sure you have sleep setting turned off.
I've always had problems with my laptops going to sleep (inactivity) and not wanting to turn back on properly.
It could be that your power settings are set to sleep after a period of inactivity. Change that to 'Never,' but keep the power cable plugged in if you do this.
And if you've been using your computer for a long time, there may be dust or other things inside the chassis, which could cause problems with the airflow. I recommend having the device professionally cleaned. The BIOS may also be outdated, so check that, format the drives, and reinstall Windows.
sometimes if system files gets corrupted it can cause problems too.
if you type 'cmd' to bring up a command window then type 'sfc /scannow' (At least in win10) it can repair the things.
yep, it also can be that if it's an ancient device drive may be compromised .. can also be ram issues tho like cash could cause the same problems.. or simply outdated drivers...