That happens to my IPhone 3G whenever I drop it. You might not want to take this route, but I slam it back onto the ground as hard as I can to get the sound back on. Desperate times, friend, desperate times.
My iPod Nano 6th generation's on button doesn't work. The iPod itself still works, but not the on button. It does this because it went through the washing machine. If yours did that too, that might be what is wrong with yours.