Ugh, the dreaded inflamed IT bands. Been there.
I've always heard that it's almost always an over-use issue, and nothing but rest will alleviate the condition. But over-use is a bit of a generalization. I think that usually what happens is a combination of a sloppy stroke coupled with a lot of hard riding, so maybe "over-abuse" is a better term?
Stretching is always good. IT bands can go into prolonged spasms, just like the lower back. You have to stretch calves, hamstrings, back, all of it, in order to get those muscles to relax.
That said, once you can start riding again, it's probably best to concentrate on a perfectly up and down stroke, especially as it applies to your knees. They can't bend in or out, they should go up and down and that's pretty much it.