This happened to my iPhone 4 too. Over a period of a few days it got worse and worse until it stopped working at all. Only suggestion of help I have had suggested to me is to try blast any trapped dirt/dust that may be preventing the button working properly with a tin of compressed air. I never tried this myself I think the best bet would be to try and get the button replaced.