This always happen to me most times and i don't like it, very annoying sometimes, I try to treat the writer's block by;
• Enhancing my work space, creating a quiet place for myself
• Use a porodomo Technique by not getting distracted by messages, emails e.t.c.
• Plan A Time if possible get a calendar so as to be focused
They're so many ways to stop writer's block which i will intentionally not state here but with the few help of mine. You can use it .