Sometimes writing music gets hard, and for me at least some of this comes down to boredom or frustration. It's like something gets in the way of the big picture, whether that's not achieving the sound you want or falling short in some other way. One of my strategies to help refocus on the bigger picture is to find inspiration. At this point i'd like to also point out that there are two forms of inspiration, specific inspiration and general inspiration.
I can find specific inspiration by listening to the music of other producers, or by producing or listening to a different genre of music than my own. In this way I am exposed to different production standards, different production methods, different expectations, different clichés and different ways of working a transition. Basically, I will find specific inspiration through using something that i've heard in other music in my own context. While I most often do this with arrangement by finding ideas for transitioning a song in the music of other producers and in other genres, I also have found that sometimes it can give you specific track ideas, in that you find a sample from something you've heard that can then be the basis for one of your own works.
While the above is certainly a useful tool, I almost always find that latching on to inspiration of a different nature to be more exciting than finding specific musical inspiration. I am a huge fan of science fiction films, and I find that translating visual or abstract concepts explored in science fiction into my own sonic concepts to be much more rewarding. This kind of general inspiration or the idea of having a visual concept or an abstract idea that you want your music to reflect seems to be of more importantance to me for a couple of reasons.
First, having an idea of what it is you want your sound to reflect will help really focus your ideas and methods without being so strict as to not allow creative wiggle room or freedom. You have a goal and an end point of what it is you want to acheive and experimenting with concepts outside of this scope, while good for creative practice and versatility, are not something you may necessarily use. You can focus on your style, and develop it pr push it in new a different ways since you're only constrained by an abstract idea, not a set of strict rules. And secondly this is improtant simply because art is not created in a vaccum. Everyone has inspiration and ideas that they borrow from, and then make their own. Without a cultural context, without other ideas both musical and non musical, it would be very difficult to be creative. It would be distinctly difficult to combine ideas in new and interesting ways. To create interesting combinations, to get excited about putting ideas together in your own way, first you must listen or otherwise absorb passively.
So where do you get specific musical inspiration from, and what ideas or other abstract concepts do you want your music to reflect? If you don't do this, then why not?