hello need a little help

my computer just turns off sometimes
not shuts down but just turns off as if the power went out

the computer is a home built pentium 4 1.6 with an intel mother board

sometimes the computer will work for weeks without a problem and sometimes it will happen more then once on a day

once it turns off i have to unplug it from the wall or filp the power switch on the psu on and off to get the computer working again or else it just wont turn on

any ideas on whats wrong
doesnt seem to be a heating problem becouse sometimes it stays on for days and its ok

im thinking maybe something wrong with the psu but would like to here other thoughts