Heat problems
Security problem
Software problem
A hard disk that is dying
Heat problems - very obvious. Overheating of hardware components
will force a shutdown and the PC will restart.
Security problem - some viruses are known to make a PC auto
restart. One of them is Blaster. Otherwise, you have someone who is
able to control your PC, and is able to do an auto reboot without
you knowing.
Software problem - if you have parental software installed, and it
has settings which auto reboots after X hours of use, that may
explain why. Or other software bugs. That is hardly the case and is
seldom seen.
A hard disk that is dying will give lots of problems.