The first thing to realize is that there's no such thing as "Random" when it comes to a computer. Even random number generators aren't actually truly random. This means that any problem you're having, it has a root cause that is very likely a single problem repeating itself. If it takes time to happen, it's probably heat or memory related. Things that you might think are extremely intensive in an application may not be, but a memory leak could ruin your day quickly.
First, make sure you're not just overheating. Guilty components would be the HDD, RAM, CPU, or Video Card. The CPU is unlikely, as the computer should restart itself if this occurs as a safety measure. If it were the HDD, you'd probably get a nasty BSOD and then the computer wouldn't come back online. Tools like CPU-Z and RivaTuner can monitor your temperature sensors for you.
No matter your results here, also check out the Event Viewer and choose Applications. This may take a moment to load, but should give you a list of errors thrown by applications in recent history, even if the computer rebooted. This won't catch errors that are consumed and hidden by the application (as is the case in many games).
If you're still having trouble and have ruled out the above causes, reinstall the application. If that doesn't help, it may be time to just wipe the computer completely and start fresh. Before you do that, though, you may want to try a stress test using Prime95. This software can really put your machine through it's paces and intensively tests your RAM and CPU. There's a how-to link if you scroll down the page. Prime95 has caught every stick of bad RAM I've ever had the misfortune to pull, so if that's your problem, Prime95 should expose it.