I dont know if this will help, most, if not all, has been posted before. But here i go:
Play constanly. I have found that playing alot really helps. Start with a basic "beat" and go form there. Just play around with the music. Let it lead. Try new things when playing, if there bad, just go back and try again. If there good, go with it. The main thing is to have fun with it. It is wise to take breaks and do other things. You never know what can give you inspiration. I've been influenced by movie lines, conversations with people, and other various, random things that i ran into in my everyday life.
Listen to music, and alot of it. I spend alot of hours listenign to music. It doesn't matter what it is, as long as you like it. I have had some of the best jam sesions after listening to music. It is always good to incorporate what you've heard into your music. As the others have said, play along with the music. That is one of the best ways to learn different ways of playing.
Carry paper and a pen around at all times. Things will come to you at the oddest of times. WRITE THING DOWN. I know it has been said, that is some of the best advice you can give anyone. You will forget things. It sucks, but it will happen. It's happened to me alot, and i hate it when it does. Some of my best material comes when just thinking/singing randomly.
Think about it often. I am always singing and thinking about various riffs and such. Hum, sing, dancem do whatever is nessacary. When I just babble on and on, i come up with the best lyric and beats.
Don't put pressure on yourself. Don;t make yourself think of something. Let it come naturally. Go with the flow, they say. It's good advice. Explore, explore, explore.
A few of those things may be extreme, but hey, they help. Believe me. I hope i was of some assistance to you in your musical journey.