I became annoyed at the calls and updates I was receiving in the middle of the night. I had to have my phone on in case one of my children needed me as they are of the age when they spend more nights at friends houses than they do at home.
Here's what I did to set it up:
1) go to your family members in Contacts and set a custom ringtone for each person (You can use the same ringtone for every one, I just like to hear who's calling without picking up the phone).
2)
Download a ringtone that plays few seconds of silence.
3) Install the ringtone in iTunes
4) Sync the ringtone to your iPhone
Ok, now you're ready for the clever part. I know this is a kludge but Apple still has not created sound themes in iOS.
Change the ringtone to the silent ringtone you downloaded earlier.
Turn off all alerts and sounds (see the image).
Change the SMS tone to None.
Advise your family members that they will have to call from their own phones for you to hear the ringing. SMSs will not make noise.
I also turn off the vibrate mode as the phone will still vibrate for all SMS and calls.
When you wake, restore all your preferences. I set an alarm to remind myself to do this.
The great things about all this are:
You will still be contactible in emergencies.
Alarms will still sound as normal (unless it's a change of daylight savings, but that's another rant).
You can sleep without being woken by random messages and alerts but still see the alerts when you to wake.
The down side:
If they have lost their phone or the battery is flat then you will be uncontactable by mobile. They will have to ring the landline instead.