I regularly stay up until after mindnight doing stuff, and up at 6am. I simply don't sleep that much. If I go to bed before that I tend to toss and turn and don't get a lot of sleep anyway so I figure why not be productive.
Most nights I'm working on code or writing or gaming though I occasionally will stay up and read a book.
I think you can get more that 4-6 good hours of good work out of programmers so long as you break it up. 12 hours is possible on occasion but not daily. You will burn out and become brain fried, but if you break it up, say 4 code 1 doing something completely different 4 code 1 something different and 4 code you can do it on a more regular basis.
And by 'something different' I mean engaging different parts of the brain. Paint, write, clean house, yard work.. something that gets you away from and disconnected from the computer and the work. Gaming might qualify but if your on the computer or XBox your not really disconnecting from the tech.