Here's the problem, your Windows XP computer restarts overnight. Not every night. Not even every week. Just once in a proverbial blue moon, when your groggy self schleps to the computer room, and is greeted by a logon screen. Virus? Malware? Uncle Fester escaped again from attic? Nope, just a regular ol'
Windows automatic update.

Here's how to diagnose:
To change Windows automatic update settings:
the same thing happened to me when i was working on the computer yesterday – without warning, my program shuts down and the computer reboots – making the change right away – thanks mike!
cornerupdate - 03/12/09 - 18:58
Leaving a computer on is does nothing but waste energy which means higher electric bill. It also subjects your computer to hackers. A hacker wants nothing to do with a computer that is only on when in use.
RescueRanger - 03/12/09 - 21:35
go into control panel, network settings, right click on whichever connection type you are using (wireless or lan) and create an icon on the desktop – use that icon to connect and disconnect – immediately disconnect from the internet after checking e-mail and taking care of online business – never leave an internet connection open all the time – as rescue says, it’s asking for trouble
cornerhydrant - 03/12/09 - 23:03
control panel/power options – display to sleep at 15 minutes, computer to sleep at 30 (this is default on mine)
cornerhydrant - 03/12/09 - 23:09
Or, equally as plausible, Windows has had a fatal error and would have shown you a blue screen of death but the OS is set to reboot whenever a BSOD occurs, so you never actually see it.
On XP you can right-click My Computer, select Properties, go to the Advanced tab, click the Settings button in the Startup/Recovery box and and uncheck the box marked Automatically Restart.
Paul - 03/13/09 - 19:37
great tip! made the change right away – this explains a lot of restarts when i was not connected
cornerhydrant - 03/13/09 - 20:24