Macbook Air M1 restarting after charging overnight
When my Macbook is charged for more than a few hours/long periods like overnight, it automatically restarts. I'm using the official apple charger, and tried to charge using Safe Boot which has not fixed it. I've also done a diagnostics test which returned no issue. This issue has been happening in both Ventura and Sonoma. Is there any way to fix this besides performing a system reset?
MacBook Air 13″, macOS 14.0