When you were in Safe Mode, it didn't reboot at all, correct? How long were you in Safe Mode? Although it's not very convenient, it may be worth running the phone in Safe Mode for an entire day, to see if the reboots still happen. If not, then it's more likely that something you installed is causing the problem.
If you don't have any hints as to what app might be causing the issue, then it gets pretty tedious, I'm afraid. You may just have to uninstall apps one by one, and then see if the reboots go away. Since the problem is intermittent, you might have to uninstall only one or two apps every day or two. If the reboot happens again, then you know those apps aren't responsible, and you can reinstall them. Then choose another one or two apps, and uninstall those.