Some years ago I had a DOS machine that began restarting at times for no reason that I could see. No obvious pattern.
I have been having that problem for ages - thinking back, ever since I had a new power supply installed. The machine has been back to that company (and to several others) but no-one has been able to find anything wrong. It's just as if an invisible hand has hit the Reset switch and occurs only at switch on after the machine has been off for several hours or over night. Most times it works after several resets, sometimes it just gives up completely and emits loud long bleeps so I have to switch off and then start again when it (and I) have cooled down

.
I did suspect the power supply but couldn't prove anything. Needless to say, the supply is very anonymous, totally unbranded! Time for a change, maybe.
Then I'll probably find out it's the reset switch

.
GG