This is pretty common amoung iPhone 3G and 3GS's and is due to the supportive brackets inside the phone being made of plastic and wearing out over time. Eventually they get so weak that when you press the button the whole assembly shifts down instead of just the button.
This happened in my old iPhone 3G and I was able to get some additional life out of it by squeezing the phone right below the button to hold the assembly in place, but eventually that wouldn't even help. I had to replace the Headphone Jack Assembly which contains the power button.
crwdns2934105:0crwdne2934105:0
crwdns2934113:0crwdne2934113:0
crwdns2915270:0crwdne2915270:0
crwdns2889612:0crwdne2889612:0
3