Maybe others can sympathize with my personal experience. I'm a morning person. But mentally, I can't completely focus when there's things that I have to do later. I'm always worried about those upcoming things (responsibilities, meetings, kids, etc). By programming at night, after everything else is done, I can truly focus. Getting in the flow, I'm not tired and I'm completely absorbed by the current task. No future distractions.