Man! You guys have all provided a wealth of good advice...! Take a minute and read the thread again because it is packed full of really genuine HELP to a universal occurance...the dreaded writers block...dry spell.
I have tried just about every one of these and a few others like writing a parody...taking a song and mocking each section with a re-written ( obviously similar) section. Don't forget the reverse engineered song...de-construct a song you know ( or don't know, whatever ) and write a new one using the de-construct as a template.
The tried and true 'write a song every day' method. Never worked for me, try it anyway.
But frankly these a more like learning exercises. As was wisely pointed out above, inspiration cannot be forced. And every one gets stuck. It's just that whatever is blocking the flow is unique in each person, and therefore so is the fix.
For me it's not often a lack of riffs, it's that I don't LIKE what I'm playing and I discard it. "That sounds like something I've already done" etc. I needed to learn to keep stuff, and listen back with fresh ears later...much later sometimes. And usually THEN discard it hehe.
Okay, last thing I promise. Put your Mp3, CD player stereo whatever on shuffle, crank up the volume and leave. Go take a shower, rake the leaves, shovel the driveway, make wine in the garage, whatever. It should be loud enough to hear, not loud enough to distinguish detail without EFFORT. Surprising how you brain will take limited input and fill in detail.
Plus the yard will look good !!