In settings - security there is a second option related to restart: Auto reboot. You can check, if this settings is not by any chance set too strict.
Otherwise you can use adb log cat, and check if there is anything unusual. I wouldn't install any unknown app which would promise to check hardware issues, even though with an app like that, the random reboot could become just one of your many-to-come-problems:-)
If you are almost out of time and out of options, you can install stock Android and check if the problem persists. That could help to find out, where's the issue
Than we can analyze it further.