Hello, recent Macbook owner here with similar issue
In the past 3 months, it happened about 5-6 times. It's not often enough to draw solid conclusion, but here are some notes about it:
1. The lid was open when it restart. (I set the Mac to sleep if it is inactive for 10 minutes.)
2. The Mac DID went to sleep (the light indicator was pulsating before it happened)
3. In other words, you can say that it restarts while sleeping, not restarts instead of sleeping.
4. It seems that there was nothing in the system log indicating the Mac shutdown itself.
5. On the last occasion, I put the sleeping Macbook on a small chair. I remembered bumped onto the chair and 2 seconds later I was greeted by the login screen. Now the sudden motion sensor possibly had something to do about it, but I can't say the same about the other occasions: the macbook was left on my desk in a locked room.. and there were not any earthquakes or something then.
6. On every occasion, the power cord was plugged in (not running on battery - the battery was attached though)
Should I be worry? I mean, although this issue looks serious, it doesn't seem to affect my work at all - the machine never restarts while I was using it.