You know, I don't own an iPhone of my own just yet (waiting), but most of the one's that i've played with in att or Apple do this same thing. Luckily, I learned from visiting this site that if I held down the top button and the face button simultaneously for, let's say 10 seconds, it reboots and everything works fine!
Reboot the phone and it clears any bugs. Kinda like when your computer is running slow or patchy. You just reboot the comp and everything works fine thereafter. I had this problem with the phone too and when it happens rebooting it works fine.