I have also experienced the problem of misterious rebooting for 3-4 days after waking up the machine (iMac 2015). Never before. First time I thought it had some connection with the bluetooth tools (keyboard & trackpad). Both were at 0%, so I just put them on wire to charge, and after reboot everything was fine. Now, today, neither tools was at 0% (94% and 35%), though after the multilanguage screen of reboot, the bluetooth switched off itself, and I tried to connect both keyboard and trackpad in vain, the machine seemed freezing. So I held the switch on/off button to shut down. Then after restarting, now it is fine again. So I believe this problem (in my case at least) has something to do with the bluetooth tools.