We don't know your computer make or model number, operating system installed, laptop or desktop, etc. The more information you give us, then better informed our answer will be.
In the meantime, when was the last time you took the cover off the computer and used compressed air to blow out the dust from around the processor, heatsink, power supply, and all vents and fans.
Have you got a spare power supply unit which you can swap in for the current one? If so, give it a try.
If your power cord is plugged into a battery backup, try removing the battery backup from the equation and simply plug the cord into the wall socket.
Hope this helps and let us know more.
Grif
I tried bringing my computer out of sleep mode and instead it's stuck in a reboot loop where it's on for about two seconds and then shuts off then on again for two seconds then off again. This loop continues unless I shut the main power switch off on the back of the machine.Any advice on how to fix this or what's causing it? It does this even when I unplug the HD.

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic