I just went through that with a new HP Invent (business desk top computer).
They replaced everything in the CPU about 3 months prior then this
started--like yourself, "for no reason." I even traced down every cord
(blind user), and would turn it off, let it sit, made sure System Restore
was checked (that appeared to help a bit, but wasn't the culprit), and
couldn't keep it on long enough to back up my documents.
They sent out a rep finally--I wrote to their Chairman who was wonderful in
responding--and as soon as he replaced the Power Supply, and ran the
diagnostics on the HD, it was staying on. We decided to light candles over
it for a day, to see how it behaved. I added some burning Sage that night.
Its been A-1 since then. The rep said he did it...by replacing the Power
Supply on his first visit (removing all parts in the CPU, etc.), because
sometimes when they remove parts they get back into the "stack" and are put
into another computer if someone's missed checking it out when it came back
in.
All's well here. I hope your problem clears up. It terrified me. I now own
six thumb drives (SanDisk) and wouldn't be w/o them!