In my experience this behavior is generally caused by a hardware issue. Most of which have been alluded to here. Power supply failing or overheating, CPU overheating possibly caused by fan failure although heavy dust accumulation can also cause heat problems. Hard drive can also create issues. I personally doubt that a system restore will help but it won't hurt. If it doesn't I would start by opening up and blowing it out real good. Leave it open and start it up. Check that all fans are working, including the power supply.