I have an old system (only the hardware, it runs ‑current) which reboots itself from time to time (mostly during the daily periodic(8) run, but also during a lot of compiling (portupgrade)). There is no obvious reason (no panic) why it is doing this. It could be that there is some hardware defect, or something else. It is not important enough to get a high enough priority that I try hard to analyze the problem with this machine. The annoying part is, that sometimes after a restart apache does not start. So if this happens, the solution is to login and start the webserver. If the webserver would start each time, nearly nobody would detect the reboot (root gets an EMail on each reboot via an @reboot crontab entry).
My pragmatic solution (for services started via a good rc.d script which has a working status command) is a crontab entry which checks periodically if it is running and which restarts the service if not. As an example for apache and an interval of 10 minutes:
*/10 * * * * /usr/local/etc/rc.d/apache22 status >/dev/null 2>&1 || /usr/local/etc/rc.d/apache22 restart
For the use case of this service/machine, this is enough. In case of a problem with the service, a mail with the restart output would arrive each time it runs, else only after a reboot for which the service did not restart.
I used to do this as well, but have since moved to daemontools. Ensures processes are *always* up without a 10 minute window of downtime possible. Especially if your app if crashing as well.
Daemontools is not a part of the base system, so it would require to install it additionally. The post I made is for cases where the uptime does not matter that much, and where you do not want to spend the time to install and configure additional software. And the 10 minutes was just an example, you could let cron check every minute if you want. But as I wrote, in my case it does not matter much. Places where I would use daemontools are places where such a reboot for an unknown reason which I described would not be acceptable (number one priority would be to find out the reason of the reboot and do something to fix the problem).