I used to work crazy long hours for a huge US software company.
One of the quietly voiced lines was "We have a flexible 8 hour day - you get to choose which 8 hours you don't work."
It is easy to ignore the feeling of fatigue and brain fog when engaged with a task AND you are burning to get it done (just to move on from it or to meet a deadline).
Sometimes I would be at the office (in the days before telecommuting...) until 2am struggling with a task. Just getting nowhere, but unwilling to give up until I just had to abandon it to get home for a sleep and a shower....
I would find out the general state of my brain fatigue, if after going home and even only getting a few hours sleep I would return to work not so bright but very early and the solution came within 5-10 minutes. AND it was so frigging obvious. Painfully obvious and easy. Yet I might have worked on it for 4-5 hours the night before.
So in a long project, that was my sign I needed to watch how long I spent on a task because fog/fatigue had set in and my perceptions of things my not be so clear. The first time that happenned was my signal to ease back a bit and step back from any challenge to give myself a chance to "freshen up".