Just to clarify your message - are you saying your computer doesn't crash straight away? But does if it's left on for a long time?
If that's the case, it could be a heat problem. The fans in your computer blow air around to keep it cool. If any of them fail, or don't work very well, your computer will heat up. This can then cause your PC to crash - obviously it won't happen straight away (when it's cold) but later; once it's heated up.
One way to prove this is to try opening the side of your case to let more air in and see if it improves. While it's off, check all the fans and make sure they are all still spinning!
If that solves the problem, you might want to buy more fans for your computer.
Hope this is of some use