Sorry, this will be too late for you, but gonna leave this here in case someone else searches for it.
Fixed this problem tonight. Apparently, tightening up the phone fixes this (the power button unit does not attach to the rest of the phone, it merely comes into contact with the board through proximity). You can tighten the black screws on the motherboard (hard) or press hard on the upper left hand corner when taking the back cover off where the battery and sim are (easy - no real disassembly required).
For a REAL and PERMANENT fix, you can totally disassemble everything and pry the tiny metal prongs in the power button area to a higher angle, ensuring that they connect effortlessly. This is considerably more difficult, but will prevent the problem from returning- FOR GOOD.
I've just been trying every fix going to sort this and came across this fix - worked instantly - very relieved and very happy - thanks so much!
by Karen Wilson
My wife's Galaxy S5 was doing the same thing; this fixed the problem. I suspect I know what is causing the problem. My wife is OCD and tends to press the power button too firmly. I think that caused it to depress too far and eventually stopped making connection with whatever it was supposed to. Thanks for this fix; she loves this phone and didn't want to have to get another ... believe it or not.
Do you need to replace the BUTTON or the SWITCH? The BUTTON is what you press and the SWITCH is the part inside the case that actully turns the phone on and off.
by Wayne Adams
@Wayne Adams most times, the micro switch inside soldered to the board
by Rodney Kahn
I was removing my finger sensor and when I assembled everything back my phone won't turn on. Without the finger sensor would the phone turn on?