Sounds like an airflow and power supply problem. I would probably crack it open, take it ouside and clean it out with some compressed air. (stay around 4cm away from the motherboard and use short burst sprays instead of holding the nozzle down. Also hold any fans still when you spray them)
After you cleaned it you should take a look at 2 things:
1: Case fans (these are used to pull hot air out of the case)
2: Cable management (are there long cables just floating around? get some twist ties or some zip ties and shorten them up so they fit snug and follow a consistent path)
One thing you can do is unplug some things you dont need like a DVD drive for example and see if the problem persists. It might just be a power supply with some dead capacitors (dont try to fix that, you will just electrocute yourself) or the power supply is not rated to power everything inside the PC)