The NY Times answers Spontaneous restarts can result from a number of problems, including a worm or virus, a bad memory chip, software driver conflicts, a bad motherboard and overheating. It may take some time, but there are a few steps you can take to identify the cause.
An Internet scourge like the recent Sasser worm can cause erratic computer behavior like sudden restarts, as can some spyware. To help eliminate such annoyances, you should install and run an antivirus program, set up a firewall and make sure your operating system has been updated with current Microsoft software patches and security fixes
(get the full answer)