Staying away from the 5am coffee run is key. It always smells soooo good, and the nurses send a tech out to Dunkin Donuts for *real* coffee... I try to limit caffeine anyway, but especially when I know I'll need to sleep in the near future. If I'm on a string of nights, I just plan to crash when I get home (7:30-8:30-ish) and sleep until I wake up around 3-4. Working 12s, there's really not much time for life whether it's days or nights, so I just plan to work, sleep, eat, maybe take the dogs for a run, and not much else. That way, if I do get anything productive done, it's an unexpected bonus.
Day to night switches are easy - stay up as late as possible the night before going to nights. I shoot for 3am, but don't always make it. Discovery Channel, History Channel and TLC help. Or occasionally I'll plan to do midnight cleaning or Wal-Mart runs.
On night to day switches, I go directly to bed, sleep until about 1, force myself to get up (dogs wanting to go for runs NOW seems to help... cold noses!), and plan to just chill for the rest of the day. I'm usually ok for bed by 10-11, but if I think I'll have trouble, I'll take Ambien. I'm a bit grumpy and sleep deprived, but it's not as bad as being post-call, IMHO.