Working extra hours increases productivity by (at most) a small linear factor. All other things being equal, increasing from a 40 hour week to an 80 hour week will at most double productivity.
Increasing the rate of production increases productivity by (at most) a moderate
linear factor. Crunch time may increase productivity by a factor of three or four at most.
Error rate grows costs (at most and in practice) super-linearly. The remediation of errors can (and often does) cost hundreds or thousands of times as much as was saved by the practices that led to their initial introduction.
Controlling the error rate is therefore the primary lever that we have available to us that we can use in order to improve productivity.
In particular, any increase in working hours or in the rate of production which also increases the rate at which errors are introduced is likely to be self-defeating in terms of overall productivity.
There exists an optimal frontier of working hours and rate of production which balances the cost due to errors with individual productivity.
This optimal frontier will be more strongly determined by factors which influence the cost due to errors than by factors which influence the rate of production.
The factors which influence the cost due to errors can be split into two categories.
The first category is comprised of factors which influence the shape of the (super-linear) cost function; i.e. things which limit the impact of errors to make them less expensive. (Architecture; quality systems; testing).
The second category is comprised of factors which reduce the initial error introduction rate. (Architecture; quality systems; level of fatigue; ability to concentrate).
Architecture and quality systems are obviously of critical importance because they influence both the cost of each error and the rate of error introduction.
Human factors such as working environment; cardiovascular fitness; length of commute; quality of accommodation and family situation will all influence fatigue and concentration and so impact the rate of error introduction.
Architecture and quality systems look like the big hitters in this analysis, but I would suggest that monitoring for indicators of fatigue is probably also worth doing, as is encouraging cardiovascular health amongst developers.