Its going to be heat related somewhere.
I had the same issues a few years back.
Took side of PC and ran a fan directly into it and it stopped rebooting.
Ended up buying 3 extra fans for inside the box, 2 extra in the case and 2 extractors.
Think it ran at something like 25C on full load.