Compression socks can be used to multiple purposes. And while they can certainly help those who are on their feet all day and have to deal with swelling ankles, what I want to bring up is the way they can treat lymphodema.
A lymphodema is a swelling in the feet and ankles. My mother had this. The swelling makes it very difficult to walk. However, what these compression socks did was squeeze her feet and ankles (not to an uncomfortable level) so that most of the fluid left the inflamed area and she was able to walk more comfortably.
The resultant loss of fluid from that area meant that her ankles and feet ended up shrinking back almost to normal size, though I will say that they never returned quite to the way that they once were.
For that reason, my personal experience dealing with compression socks and seeing the results that they were able to give Mom, I feel safe in recommending them if you have swollen ankles or feet as one way in which you can alleviate your discomfort and reduce the inflammation in your ankles and feet.