Panic. Then think about all the time your iPhone was exposed to moisture: jogging, that day you got caught in the rain, the time you set it down in a ring of condensation. Then you'll think about the times you've dropped, sat on it, and kicked it.
Then relax. Chances are, your iPhone simply decided to reset itself.
This happened to me the night before the most important business trip of my life. I was about to spend 6 days in California with no means of communication--except for my laptop and Google phone. Plus, I was coordinating activities of 4 other consultants.
I woke up soaking wet with fear at 3:30 a.m. I decided to play around on the internet and searched for symptoms like mine--the phone shuts off and pressing the top silver button or the round awake/sleep button does nothing.
What I found was a MacRumors forum discussion with a simple solution: Press and hold both buttons (top silver, bottom round) until the little Apple logo appears. For me it was about 10 seconds. (You'll lose hope after 5, but keep holding.)
You might want to bookmark this post in case this ever happens to you.