How do I fix the sleep/wake button on my iPhone 5?

The sleep/wake button on my iPhone 5 is broken.

I have heard of people not being able to lock their phones, but I have the exact opposite problem. My phone will lock, and sometimes even turn off without touching the phone or the button. Any suggestions on a solution to this problem?
Re: The sleep/wake button on my iPhone 5 is broken.

Make a Genius Bar appointment with the nearest Apple Store and the get the sleep/wake button fixed.

Original thread: https://forums.imore.com/threads/how-do-i-fix-the-sleep-wake-button-on-my-iphone-5.304749/