Check for shorts inside the case (a loose screw etc.), then reseat everything. It could be a PSU problem. If not, then you're going to have to take the PC down to minimum spec. and see if it does it then (just PSU, motherboard, CPU + cooler, one RAM DIMM). If not, start adding the components back in one by one until the problem happens again. If it still does this on minimum spec, you will have to try different components to isolate the problem.
Touche, November 2010