trying doing some things music related but not writing, say for a day or two. watch some interviews or tutorials, brush up on your musical knowledge, or just make some beats or chord progressions!
all those usually help me, caffeine helps too, i get away from the studio for a couple of hours, drink a cappuccino or have a red bull or somethin and things just start happening soon after, just get yourself hyper.
some people say you get blocked because you dont enjoy what you're doing, maybe thats true/maybe not, i cant say, but maybe it is for some people, if you feel like you're not enjoying your productions find out what it is you dont like about them and focusing on improving *that* specific area.
some research has been done on creativity and apparently going for walks helps stimulate creativity, try that too?
im not saying this WILL will work 100%, you gotta remember everyone is different, so try find the thing that helps you get out of the block.
hope that helps ✌