Well! Not my computer but a friends.
I've fixed a shitload of puters & never seen anything quite like this.
It's a desktop: If I stand it, it'll power up but won't load on the screen. Lie the fucking thing on it's side and it works fine.
Sometimes it'll switch off if bumped.
cpu isn't overheating, checked for loose wires between the power switch and motherboard but nothing wrong there.
The only thing I can think of is a loose connection somewhere in the psu.