Think of your favorite riff by your favorite band. Play it, speed it up slow it down. Now play it in a few different keys. Play it in reverse. Change a few of the intervals (how many frets between the notes of the riff). Play it in a different rhythm.
I do these things all the time to help myself come up with ideas for new riffs.
Try it yourself!