What's weird is that it happened earlier this year and I got a replacement iPhone 5 at the Apple Store that wasn't supposed to have this problem. Then the day that iOS 7 Beta 6 came out it suddenly started doing it like crazy. The first time it happened earlier this year it was more gradual. It was perfectly fine the day before Beta 6 came out and then when I installed it the first thing I noticed was difficulty using the sleep/wake button every time I used it. This iPhone has never been dropped or impacted. The one I had replaced had been dropped once while in a protective case and had no visible signs of damage.
I will say that I noticed the button working more from the left side when pressed, which was weird. It feels as though there is one clicking mechanism on the left and another on the right. When I look at the button itself flush with my eye level, it seems as though the right side is sitting lower, and when I gently tap the button with my finger (not a press but a tap) I can hear that the button is slightly loose and it makes a little jiggling sound as though it were not properly seated. So perhaps it's a huge coincidence, but it does seem different than the last time I had this problem.
I will say that I noticed the button working more from the left side when pressed, which was weird. It feels as though there is one clicking mechanism on the left and another on the right. When I look at the button itself flush with my eye level, it seems as though the right side is sitting lower, and when I gently tap the button with my finger (not a press but a tap) I can hear that the button is slightly loose and it makes a little jiggling sound as though it were not properly seated. So perhaps it's a huge coincidence, but it does seem different than the last time I had this problem.