I experience this myself since I like to push myself beyond my capabilities, and get the most done the best I can. After a few days or weeks my motivation crumbles and I'm tired of being productive.
Taking rests for a while every now and then helps me. It fuels my motivation even more so since I'm eager to get back to what I was doing. Breaks for me are usually doing an enjoyable hobby, having a good conversation with a friend, or meditating if I need to really relax.