I used to have this problem with my computer, it turned out that I had set the memory timings to aggressively in BIOS. If it continues to happen, download memtest and check for memory errors.
One time I woke up and my PC was on. I'm completely sure I turned it off the night before. I guess we had a power outage and when it came back the PC booted up.
Windows, by default, is setup to reboot when it encounters a grave enough error that would otherwise lock the computer into a blue screen. On paper, I'm sure it was a great idea, just like integrating IE so tightly into the operating system.
That, or a few programmers thought it'd be fun to watch people flip out when it happens.
Right click on My Computer -> Advanced -> Startup and Recovery. Uncheck "Automatically reboot." The next time the error occurs, you'll get a blue screen, and then you'll have to reboot. But, you know, it's the principle of the thing. At least the blue screen may tell you which program is causing the problem.