I can only speak for myself, but I find the quality of output decreases pretty steeply after around six hours of flow. Determination can keep me going but I’ve learnt that it’s probably more efficient to just rest and return to it after a good night's sleep.