I answered a similar question some time ago on Programmers SE: Are developers more productive at night?
One interesting paper I ran into with a different perspective than the one provided in Justas's answer is "The Programmer Life-Cycle" by Russell Ovans (2004). It discusses the productivity of a programmer over time.
The sequence of phases is: euphoric, productive, irreplaceable,
resentful, bored, and unproductive. Overall productivity is
characterized by an initial six month period of intense interest, at
which time productivity rates are often an order of magnitude higher
than the oft-quoted 500 LOC/month average. After a short period of
volatility, the programmer then enters a prolonged phase of steadily
dwindling interest, resulting in productivity rates that mimic the
An important disclaimer to add: his perspective is based on his own observations and experiences over the course of six years while working as a senior software engineer.
Although perhaps not as relevant to you since you state you mainly work at night due to critical phases of a project, other programmers generally prefer working late at night. Taking Ovan's report into account, and considering that programmers usually work on individual projects at night, a simple reason could be that it's this 'euphoric' drive for short-term individual projects that makes them productive, causing the desire to stay awake and continue work.
Ovans, Russell. "The programmer life-cycle." ACM SIGSOFT Software Engineering Notes 29.3 (2004): 25-26.