Boring tasks lead to distraction and procrastinationand enduring them exacerbates the problem. Bytaking frequent breaks and doing physical activity, gives you the energy you need to maintain focus.
Work in fifteen-minute bursts. Set a timer and try to do as much as you can before it goes off. When time is up, do something physically active, then work for another fifteen minutes.