You'd have to diagnose it before you can fix it. If it's an intermittent power switch you replace the switch. If it's a bad solder joint, you resolder it.
I don't think it's a software problem, which rebooting would fix, I think it's just that you let the phone sit for a minute, then tried again. But if it's a software problem caused by bad software, reflashing the phone would fix it. If it's a software problem caused by bad memory, it would probably need a new motherboard.