I believe that you shoud buy the highest class of service you can get on the airplane. I traveled with a badly damaged leg for many flights and can testify that I always felt worse when flying than when on the ground.
Few issues with the TSA as all they had to do was give it a look and they could see it was damaged.
Talk with your physician about medications and tactics.
I also avoided any foods with salt as that made the swelling much worse (and me more miserable).
I carried my own pillow and often used the travel table (I'm a short person ) to help support my leg. You have to get creative.
I carried Zippy bags and either bought ice when past security at the airports or begged some from the FA's. Ask your doc about ice.