At each step, completely unplug and replug in.
Power cord in back of computer.
power cord into power strip.
check switch on power strip.
power strip into wall.
When I see this it is most often caused by a cable that is partially plugged in and when you move your foot disrupts the cable.
Test your power supply. Does the fan on the power supply still work? Could be going bad or over heating.
Is the fan on your heat sink working? Blow this out. If CPU is overheating it can cause a crash/shutdown.
If you have a second hard drive laying around, run off that for a few days. This will eliminate if it is a bad drive or if the OS is pooched.
IF that doesn't work, post in the Q&A section as this is the discussion section. You will get tech help in the Q&A section a lot quicker there.