I've had it happen fairly often because of overheating. Had an old PC with only the PSU fan for exhaust and that failed. PC would overheat and shutdown restart.
Other than that, the most likely causes are PSU and motherboard in my opinion. I haven't had bad ram cause reboots, just all kinds of crazy stuff. Apparently burst capacitors are becoming a more common problem, we have some IBMs that this happens too. Its a known problem of these machines, but IBM basicaly said "Warrenty is expired, screw off" to me when I called them on it. The capacitors swell and crack, then the system reboots randomly. Often it can't even load the OS.