Longer than that. In WW2, factories increased hours to 60 to increase production. The workers were all on board with this. Production increased for a while, and then dipped below the 40 hour results.
Some experimentation showed that to get a sustained increase in production, the working hours would be increased for a time, and then brought back to 40, back and forth.
Personally, I'm well aware that when my tiredness exceeds a certain level, any programming work I do has to be undone (thank you, git!) and redone after I'm rested. What I do when I want to work, but am tired, is work on things that don't require much attention, like organizing my office, making backups, etc.