MacBook Air randomly shutting off & won't turn on unless I hold power button for 10 seconds
My 2013 MacBook Air has just started randomly turning off when I leave it for 5-10 minutes. Instead of going to sleep it is completely shut down. I can then only turn it on by holding the power button in for 10 seconds. When I hold the button down, I hear the power up chime and the apple logo with the loading bar appears. If I let go of the button before 10 seconds, the screen goes black again.
When I am able to successfully turn it on, the first few minutes seem to be very slow and laggy.
It was working completely fine until this morning when I noticed it was turned off.
Would anyone have any idea why this is happening or any ideas to fix it?
Thank you!
MacBook Air 13", macOS 10.12