I, too, had this issue appear out of nowhere. I awoke this morning to find my iPhone showing "Searching..." in place of the carrier logo and signal strength.
I popped the SIM card in / out at least a dozen times. No joy.
I attempted to restore using no less than 3 machines. No joy -- each time the restore process halted about 2/3 of the way through stating "An error occurred. Could not restore iPhone (error 1004)."
I attempted to restore after putting the device in Recovery (DFU) mode. No joy -- the phone consistently displayed "No SIM card present" even though my ATT SIM was properly inserted.
After talking to Apple Support, I was told to go to the Apple Store.
The Genius was able to successfully restore, however, my SIM issue remained. She tried with a known good SIM card, and the message continued to appear.
She quickly issued me a replacement phone...
Skip all the hassle and go directly to Apple stating that you need to exchange the device.
How the iPhone suddenly stops working in the middle of the night is beyond me... but please do yourself a favor and go straight for a hardware exchange.