PC switches off (mostly when I play video games) and turns on by itself. Sometimes it can't turn on at all. It doesn't switch off abruptly; it exits whichever program is open and displays the "Your computer is shutting down" screen. I changed its hard drive and installed a new system; ran a memory diagnostic tool which turned up no errors, cleaned it thorougly and replaced the thermal paste; bought a new power cable. HWinfo shows around 50C CPU temperature when idle; up to 75C when under full load. The motherboard temperature goes up to 50C. Professional repairmen told me it's a cooler/dust problem, then when the problem persisted, told me it's a hard drive issue. They said the temperatures are high, but shouldn't cause the beforementioned issue. It's worth noting that I've had this PC for a year and I always switched off the power at night because it would turn on by itself, but it would never shut off.
I don't know the name of all my PC components, here are the ones I do know:
I don't know how many times I have to explain to people what "cleaned it thorougly" means. There was not a speck of dust left. Now, do you have an actual advice other than "clean it and restart the PC"?
PC switches off (mostly when I play video games) and turns on by
itself. Sometimes it can't turn on at all.
The symptoms you describe are classic for an overheat problem.
However the fact that the machine displays "Your computer is shutting down" screen means that it is a controlled shutdown by a program of some sort, quite often a windows update will do this to you unless you change the settings to download but dont install
Turning on at night means you probably have "wake on LAN or "wake on Ring" enabled in the BIOS