Here is a deceptively simple exercise to dramatically increase your rhythmic versatility. Take any chord progression and just play the root note on the downbeat. (In the old days I used to record the chords on a multitrack tape recorder. Nowadays there are plenty of other, easier options, such as Garage Band or Jam Studio.com).
This shouldn’t be that difficult, but the next step is to play the root on the “and of one”. (Don’t play it on the “one” when you do this. We’re only playing one note per measure). Then move on to playing it on the “two”, then the “and of two”, and so forth until you’ve covered every eighth note in the measure.
An important point: when you get to playing on the “and of four”, this can sound like an anticipation of the next measure (or a “push”, as it’s sometimes referred to), and so you may want to experiment with playing the root note of the subsequent measure, as well as the root of the measure you’re in, and notice how different they feel.
Also, mess around with how long you hold the note for. Try playing them staccato, which means very short, and also holding for various lengths: an eighth note, a quarter note, a beat and a half, etc. As always, observe how these changes affect the mood of the music.
Incidentally, this technique is also a great way to get comfortable with other rhythmic feels, such as sixteenth notes and triplets, and for odd time signatures. For example, say you’re coming to grips with a 5/4 groove that’s in a sixteenth note feel. Just go through the same process, playing just on the downbeat, then the second sixteenth note (the “e of one”) and so on until you’ve learned to feel every sixteenth note in the measure.
After doing the above, you should notice that when you’re improvising or writing lines, you’re rhythmic vocabulary has increased and you’re more able to play the rhythms that create the emotions you feel best serve the music you’re making.