It sounds like a hardware issue as opposed to an OS one.
It could be a problem with the power supply. I would open up the computer and
blow it with a can of compressed air and see if that resolves it. If you haven't
done this lately this could be the source of the problem. Or if you have added
hardware and your power supply is not powerful enough it will act like this,
too. These things can be erratic so it is hard to see a pattern and attribute it
to one specific thing.