Seriously, though, I have written some pretty elegant stuff later in the evening, both programmatically and story-wise.
I think it's the quiet time, lack of ringing phones and so on that seems to do the trick. Even the cats settle in and don't need attention after a certain time of night!