Make sure your bios is set at shutdown when power outage.
Post your build.
Download HWInfo and run Sensors. The post the results - usually 3 screenshots in TinyPic or similar.
Usually this is from your cpu getting too hot and shutting the pc down. The bios setting then gets it to restart.