I just wanted to add that for me, buying a new battery fixed it. I bought a new one for $20, in a smartphone shop nearby.
I had the same problem: my LG G3 was constantly rebooting. First it would reboot from time to time, on certain actions, so I thought that some component is overheating or...