This is a very common problem.
The first thing to do is to check that there is no pain or heat associated with this swelling. You can do that by running your hands over the swollen part of the leg : it is hot or if the horse flinches, you should seek advice from a veterinary.
If neither heat nor pain accompanies your horse’s swelling, he probably has a non-acute condition, such as windpuffs or stocking up. Windpuffs, also called windgalls, are residual inflammations from old tendon and ligament injuries. They usually occur on the back of the leg, at or just above ankle level, and are symmetrically shaped with the same amount of swelling on the medial side (inside) of the leg as the lateral side (outside). Windpuffs normally occur on both hind legs, although they occasionally appear on just one leg and sometimes can also be found in the front legs.
Windpuffs often come as a surprise because there has been no previous lameness. It usually happens later in the life of the horse and it is difficult to spot the eventual original injury.
Windpuffs happen mainly with older horses for courses that have retired from a sportive life. They move less and fluids have a tendency to accumulate in the lower part of the legs.
Stocking up results from an impaired lymphatic circulation. The origin is not always an injury but rather a difficulty to efficiently pump back fluids to the heart.
Windpuffs are generally more localized while stocking up generalizes around the whole circumstance of the lower leg.
Read more in this very documented article How to Treat Your Horse’s Swollen Legs
Funny legs point of view, photo taken by Sharlee H on Flickr