I believe there are apps in the market that can set profiles like "sleep" which will allow you to customize what wakes you up (calls but not texts, e-mails, IM's). I don't remember the names though.
Edit: just looked in the market... Type in "profiles" and it will pull up a ton of free apps that can do this. LLama even allows you to change profiles according to your location (ie. work).