macbook spontaneously quick-restarting

Twice within the last hour my MacBook Pro 15″ Mid-2015 w/ retina display restarted.

The restarts are weird, in the middle of whatever I’m doing my screen turns “black” (LED backlight still clearly on, looks more like blue) then it goes to my lock screen, loading icon appears, then shows my password prompt for me to log in again.

After logging in all my apps I had open are closed, and restart (as would happen after a normal restart).

But the whole “restart” process takes less than 20 seconds and my MacBook is clearly not powering off at any stage.