For example the power supply could be on the small side, the internals could be overheating, the motherboard capacitors could be bulging, there may be software pests.

The reasons for random boots stretch for miles it seems. The more you tell about the machine, power supply and pest control helps to shorten the list.