1. I've found recently that when i don't want to code, it's because i don't understand something. I've been picking up a pencil and paper and just working out things i'm nervous about a lot more often lately. it's been a nice productivity boost.
2. avoid crap that will piss you off to no good effect. I read reddit.politics from time to time and lose an hour just grumbling over some comment. huge waste of time.
3. i like running. i don't do it often enough... but a couple of miles will really turn down the volume on the rest of the world. very nearly a reset button for me.
4. by all means, stay up late and hack. However, for me, more than once a week is very detrimental. Sometimes, it's worth being a little slow the next day.