Some possible causes are overheating, an overtaxed power supply, bad memory, or bad MB.
Check the system and CPU's temps either in BIOS or with temperature monitoring software.
If the system temp gets over 45 deg. C, then remove the computer's cover, and run an external fan. If this fixes things, then install additional case fans. Recommended locations are lower front and upper rear of the case.
If the CPU gets over 60 deg. C, then make sure there is thermal compound between it and the heat sink. If that's ok, then install a higher capacity heat sink fan.
Also, remove and reinsert the memory a few times, and try it(them) in different slots.
The next step is to swap out the above mentioned hardware items.