Completely disable Nexus 5 Power Button and Remap to Volume Button
As a hardware solution,   


  Your power button is not broken, but getting stuck from residue or soft rubbers.


You can massage the key to help remove any sticky parts from the key and to help rejuvenate the rubber bounce.


Press the power button in reasonably hard and hold it in for a few seconds, then slowly decrease the pressure until you have removed your finger.
( This can help to crush any dust or move any residue out of the buttons path )  
Press the button in slowly until you feel it just make contact &amp; quickly release it..
( Repeatedly doing this will help to dry any sticky residue from something like a fizzy drink ) 
Blow air into the button, press a few times and blow again ! 
( This can help to remove any sand or grit that might be holding the button down )   
Massage the button, press the button in slowly and then with moderate pressure, push up on the power button ( applying the most pressure on the top part of the button )  and slowly keeping moderate pressure, drag your finger ( or roll it ) to apply more pressure on the bottom of the button ... 


Repeatedly Roll your finger ( or slide it up and down ) to distribute the pressure throughout the entire button... You will be Rocking the button while maintaining moderate pressure.

( This can help to rejuvenate the rubber that returns the button back to it's position )  

I believe the issue can be fixed by massaging the button.