Hi, I'm pretty sure that one of two things may be the problem.
1. You have a problem with the voltage being incorrect in the power supply output. Solution: Make sure all surge protectors and outlets are providing correct input to it. If you have a proper multi-meter and know how to use it, go ahead. If not, even the most expensive service call doesn't kill you, 110-120V AC can!
It could be necessary to replace the power supply if all power input shows okay and the output voltages are not within 2% - 4% of the stated nominal on the power supply rating. If you test the output of the supply, you should back probe the connectors since most supplies don't generate correct output if the leads are not under load.
2. Less easy to diagnose, but almost as likely, your computer is overheating due to a dead or nearly dead fan in the case or inside the power supply. It could also overheat if the case vents are blocked by dust and dirt or if it is simply to close to the wall and not getting airflow.
Either of the aforementioned pieces of bad luck will be more likely to cause the random reboots than software. If it was software related, it would be rebooting in certain applications or tasks every time, not randomly.
Please be careful and consider if you are qualified to check this out or need a professional. Electricity is hazardous! I wish you luck.