I personally found out that coding before sleep is a horrible thing for you - your mind keeps working on problems long after you close your IDE.
Though the tired mind is often very keen to simply recurse over thoughts you've already had opposed to think of new ones. If you find you can't stop yourself going over the day though, then 10-15 mins of meditation, where you force yourself to concentrate on clearing your mind, can stop these thoughts so you can sleep. Do this every night for a few weeks and it becomes second nature.
Seriously, invest $150 into getting a good e-reader, if you don't have one already. It's well worth the sleep benefits, potentially even more than a good mattress (for a programmer, anyway).