I recently did several 2-3 day stints of 'all night' - almost - meaning up at 6am and going to bed at 3:30 or 4am the next morning (fruitlessly trying to track down and fix some bugs on a system that was live). I was pretty unproductive at 2am, but kept thinking "almost got it... almost got it"... then didn't have it. I might have found it faster with more sleep, but maybe not - the 'fix' only came to me after digging around with the code and settings and numerous tests (was only occurring on production system, not dev system). Oh, that was the other reason for late night - could only reproduce this on production, and it was better to do it at night when there were far fewer users.