Even at my advancing age, I don't have the need for this, so I guess I am lucky :)
The real answer would be, what is cause the hurt, and then find the proper solution.
A couple months ago, I fell on a slope and really twisted by knee. Probably should have turned around and went home, but I completed the trip. It hurt so bad at night, I could hardly sleep. Each day, once I started hiking, it loosened up and I could travel, but any sharp impact of weight was painful.
I had planned another trip two weeks after this, but was considering backing out. I could hardly walk without pain (probably should have gone to see a doctor). I bought one of those neoprene wraps that slide over the knee with a hole in it for the knee. When I put it on, it immediately reduced the pain, and improved my mobility. So I wore it everyday for a week, and took it off at night. I went ahead a took my trip, but did not need the wrap, although I brought it with me. I did a lot of steep hilly travel on this trip, and still had a lingering pain once in a while. Since then I have bought a similar wrap with velcro for my ankle. On long solo trips off trail, I will bring one of each incase I get hurt. Don't feel the need to bring them on "flatter" trips or good trails.
The neoprene will be hot, but if it eases the pain, who cares about sweating?