Hi all,
i've just registered on this forum to say thanks for the previous comments as i was having the exact same problem with my Nexus 5 rebooting constantly.
Last week i took the phone apart and cleaned all around the power button believing this was causing the problem but that didnt help.
So last week i also tried all the tips on here about tapping buttons while it was booting but no luck ,i truly believed the power button was stuck as all i had to do is hold the volume down button on its own at it would boot into recovery.
But i can say my phone is now working fine and the power button seems completely normal so i'm not sure this is whats causing all this trouble.
After loads of messing around i first noticed the phone booted a little further in when connected the the laptop usb instead of the mains plug ,
and then i noticed it booted slightly further if i held onto the micro usb connection and kept it pressed in firmly.
so as i held the usb in i started tapping ALL the button randomly and noticed it got nearly all the way to booting but then restarted again .
i kept doing this method a few more times sometimes holding ALL the buttons instead of tapping them and then i tried it by holding all the buttons again and let the phone boot quite far in and the let go of all the buttons.....and it came on!!!!!!
Once it was on i went straight to factory reset and after 5 mins of waiting while it reset it came on as normal and everything has been great for about 3 hours now .
This may not work for you but i'm sure if you do something similar it will boot as i now don't think it's a hardware problem !
i haven't tried turning the phone off as i don't want to risk it

Hope this may help someone
steve