Is it rebooting, or just shutting down. If it's shutting down, it could be the power management is turned on. This shuts the system down after a certain amount of idle time.
If it is rebooting, look for errors or panics in the system log. This should be the file [tt]/var/adm/messages[/tt]. There may be some hints to the problem there.
Is it a consistent amount of time? Type "[tt]last reboot[/tt]" and see if the reboot times are consistent.