I would suggest that it could be overheating issues, perhaps monitor your core temperatures for the various components like your GPU and CPU. That restart or shutdown result, is a common outcome of overheating, and probably one of the most related to random shutdowns and reboots. But without further info, all you can do for now is monitor, and try opening your case to point a big fan directly towards your internal motherboard/cpu/etc... to help it cool along with the built in fans and heatsinks, to see if your computer lasts longer than the usual shutdown delay periods.