Few thoughts here:
"I also noticed that after around 15mins of letting the computer cool down, it boots up."
This says alot, lets start from basic to advance:
1) Cheap power supply, bad one?
2) Enough power to power your system, if your system needs 500 watts and you feeding it 380watts, or if it needs 480watts and your feeding 1200 watts?
3) Power supply compitable with your board, some power supplies have a two part mother board connection called a 20 plus 4 pin. Any open pins?
4) Possible bad mother board, tried swapping it last?
5) Possible incompatibility with the processor, are the boards bios and drivers up to date? Check the manufacture web site, not the cd that came with it. see if the processor is compitable as well as everything else(memory, etc). Some boards have issues with Wolfdale cores.
6) Better cooling, better cpu processor heat sink and fan, better thermal compound.
7) Turn off any overclocks, and used parts, possibly overclocked by the previous owner/user?