Post originale di: the dirty coast ,
I had the same problem with a Imac bought in 2017. Random restarts. After trying everything I knew, I took it to the Apple Store and they told me it was completely fine but when I brought it back, same issue. I tried to upgrade it to Mojave to see if that would clear whatever but it actually made it worse and would freeze and give me a black screen. After a downgrade I had an idea that it must have something to do with the graphics card possibly overheating( at times the fan would spin loudly during a freeze) Installed macs fan control and had it target the GPU diode and havent had a freeze since. I am an IT guy and this is a company computer but I really expected Apple’s people to know more than a random help desk dude.