Do you find yourself less productive during a day than at night. This article Why programmers work at night tries to provide an extensive explanations for this. The discovery although is not very surprising.
Usual everyone during a day have to battle with constant distractions at work like urgent emails, calls, conferences, important stuff,... etc. This is different at night when majority prepare for a bed to feel asleep. From a logical point of view this is the best time for any creative work that needs our concentration and full brain power.
Happy night coding ;)