This is a question which a lot of athletes and gym junkies ask regularly.
The answer is often a lot less than your PT or coach may recommend.
Massage can be traumatic to the tissue being treated, so rolling on a hard foam roller can do you damage which you then have to recover from. I would suggest no more than every 2nd day for recovery post exercise soreness, and every 3 days for treatment of painful areas associated with injury. With a maximum of 5 minutes on each leg depending on how hard you are going.
One common injury from over rolling is rolling too close to the outside knee, is a bursitis and fat pad irritation which can be extremely painful (so stay in the top 2/3rds of your thigh). This generally doesn’t lengthen your ITb (illiotibial band) anyway. I would say stay away from this area and focus on you gluts medius, glut maximus and TFL(tensor fasciae latae) muscles to increase your hip and knee range of movements.
The other piece of advice when using foam is change the length of the muscle as you are rolling, for example, flex the hip when rolling your gluts, or bend you knee when working your quads and TFL. This stimulates the muscle spindle fibres in the belly of the muscle for a better therapeutic effect.
Good luck and take it easy
– Tom McLeod