my home desktop does the same thing, and this last for a good amount of months without finding a solution. My father complains that even when playing cards game or browsing, the computer freezes and then restarts, does this also happen to you? The freezing part?
Last year by summer I took the PC to the store where I bought it and they had computer running all day for 2/3 days with benchmarks and heavy stuff running and they said that he didn't restart and nothing happen.
Right now, I'm guessing it might have something to do with USB ports, one time I disabled the "Legacy USB" and it last about 2 months without problems but now it's doing the same.
Note: CPU temps are a tiny bit high (70º idle - but it's AMD so...) but barely reach the 90º where he should turn off for security