Hi Leon
Sometimes the power plug at the back of the PC works it’s way a bit loose over time. Ensure that’s plugged in tight to the PC. A bump can indeed turn off the machine if there’s excessive play.
Also, RAM modules can also pop out. It’s happened twice to me in the past. Open the case (your computer is old enough to not worry about voiding a warranty

) and make sure the Ram sticks are seated properly.
(Turn off the PC and unplug it before doing this

)
You can manually disengage them and pop them back in until you hear a click