I had this issue after cycling for about an hour. I would get pain behind and to the outside of my knee which my was diagnosed as IT Band syndrome when I got a bike fit. The research I did suggested that you cannot stretch the IT Band itself but you can stretch the muscles it attaches to at the top of the leg. I was able to fix it quite quickly following the method in these two videos. I did the stretches every other day for a few weeks and have continued to do them.
Good luck.