Could be an app having issues.
Does the restarting happen when you do a factory reset and don't install any apps? If it doesn't, then it's probably an app that's causing it. Slowly install apps (1-2/day), keeping track of what you install when. Once the problems start, you have a small handful of apps narrowed down that's causing the problem.
My G3 is doing the same thing, could it be the power on/off button is stuck.
Will I lose data if I factory reset?
My LG G3 is doing the same thing. After researching I thought it was a problem with the WIFI but it still reboots even with the WIFI turned off. The phone is useless until this it fixed.