If it were overheating, it's more likely to conk out while using it, as that's when the power demand is greatest, rather than when it's idle.
if left on battery it would enter 'sleep' but touching the touchpad - or sometimes the power button - it would come alive again, but now it is shutting down (not whilst I am using it) and has to start all over from scratch.
Going to sleep still requires enough power to maintain the contents of RAM, so if your battery is getting a bit tired, it may not have enough power to maintain sleep state.
Have you recently installed any MS updates? Ever since Meltdown and Spectre, MS patches have been pretty buggy, so that's another suspect area.
SD