OSX crashes and reboots several hours after going to "sleep" (lid closed)
In my case the issue was related exactly to VMWare. Before putting my laptop to sleep I suspend the VM and the issue doesn't happen. That's a "pause" button in the VMWare UI.



Edit:

Looks like VMWare sleep functionality is buggy. I once got my entire VM getting to the point of no return. I simply use vagrant suspend these days before putting my laptop to sleep. No need to bring up VMWare UI.