I had a very similar issue with a friend's PC. Random restarts after booted, sometimes not even getting to BIOS splash and other times running for weeks with no issue.
Tried replacing PSU at first as was most logical step, this was an older modular variety and one of the connectors looked a bit poor. Issue remained. Next I did memtest on memory which showed up no issues but still tried taking out all modules, bar one and trying in different slots. Next I tried replacing GFX card and still threw up same issue. Next HDD including all SATA cables, CPU cooler, you name it, running with no hard drives or DVD drive connected, fans (apart from CPU fan) disconnected, any molex/SATA splitters that could be removed taken out. The only thing I was left with from the original build was the case, everything was either new or tested with my own working gear.
I even unplugged all the case cables on mobo and used an old IDE hard drive jumper instead of a switch to start the PC, just to prove whether there was a faulty switch (even though I'd used reset switch as power).
Eventually the issue turned out to be the case cables had been taped down and for tidiness by the builder (not me or OCUK) had been run underneath the motherboard and were shorting underneath the memory slots.
Pulled cables out after unscrewing the motherboard from the risers that were in the way and it has been fine ever since.
Well worth checking that out as this PC had been solid as a rock for 6+ years and just started randomly developing this fault. I reckon it took me 20 hours or more to figure this out and £400 of new kit (he was going to upgrade anyway) and honestly thought I was going crazy a few times.