That's always a tough time. I've gone through it a few times and the way I've gotten out the rut was different each time. Sometimes taking a break isn't a bad idea. If you just feel burnt out then a few weeks (maybe even a month or more) can really help.
If you're frustrated with your playing then maybe just focus on practicing rather than trying to compose? Or try to compose the music you really want to be playing, and practice until you can perform it effortlessly.
Another suggestion that appeals to the gearwhore in all of us is to try mixing up your equipment. If all you ever play is a 7, try a 6 or an 8 or even just a different seven string. I've had one guitar, a Carvin 727, since 2008 and just finally got a second, an old 7621. It makes me play differently, and the tones are quite dissimilar as well. It inspires me to try things that I wouldn't normally play on the carvin.
As far as composing, something I like to do is to mix up the order of instruments. That is, instead of starting with guitars like I do 95% of the time, I'll make myself write an interesting drum beat, or a catchy synth line, or a groovy bass riff, or a piano melody etc etc and fill in the guitar last.
Sorry for the rambling, just meandering thoughts.