Windows 10 shuts down after being in sleep mode overnight

Please try running Power troubleshooter and check if it helps.

  1. Press Windows + X keys on the keyboard and select Control Panel.
  2. Type Troubleshooting in the search bar on the Control Panel.
  3. Click on View all on the left navigation pane. Click on Power.
  4. Click on Advanced on the power troubleshooter dialog box and click on Run as administrator (Enter the credentials if required).
  5. Click on Next and follow onscreen instruction complete the Power troubleshooter.

In addition, go to Control Panel-> Power Options-> Change plan settings-> Change advanced power settings -> Sleep -> Hibernate after -> here put both "never".