(Most of the answers here are assuming that the question is in reference to something more tangible, more directly controllable that what I hear the Question asking.)
My colleague (currently my boss) and I have noticed that we seem to have irregular cycles of very high productivity and very low productivity. We have likened it to Bipolar Disorder. During our manic-like phases, we can code like crazy. And during the depressive-like state, we struggle to get anything worthy done.
Lucky for me, my boss is very open about these things and the solutions to them. Our approach has been to embrace the manic episodes, and work more hours per day, where we get most of our overall work done. During our off phases, we work less and do non-coding tasks.
There is a risk of entering perma-slack, yes. But our company is very small, we know each other well, and the list of things to do is endless. Extended periods of slacking don't happen.
We believe our approach maximizes our creativity, efficiency, and overall motivation.
Then again, it's a highly individual mental health thing, and requires honest introspection. Some people are just not capable of that. And some people think we can be machines with a steady rate of productivity.