Chosen Solution
My standby/power switch on the iPhone has not been working the last several days and I finally figured out why. The front and rear of the iPhone do not fully snap together in the top right hand corner. I can push them together and they will stay together for a few second and the button begins working but then they come back apart. The gap is almost unnoticeable but even when I left it pulled together overnight it still wouldn’t stay together in the morning. Any suggestions would be appreciated.
Perhaps something very small (as in a grain of sand) is stuck inside preventing full closure. I would suggest you open it up using a guide like this one to get inside, and check that nothing’s there, and then reassemble it carefully, making sure everything lines up and is flush.