Might sound a bit of a coincidence but check to make sure the PC is not getting too hot. Check the cooling fan on the processor for dust and fluff and also power supply. If the processor is getting to hot then the PC will shut down periodically when it gets too hot. A bit of a fail safe to stop you cooking your PC! I've seen it happen a few times to PC's and once I've cleaned the processor fan it's all OK again.

