I often find myself mote productive after a mildly bad night. The brain stops anxiously looking for nuts to crack, and instead can easily focus on a single problem for a long time. Isn't best for all scenarios, but definitely superior in some, e.g. implementing a large chunk of logic that was designed earlier.