The swelling in your ankles is called edema, which is defined as an abnormally large amount of fluid collected in the spaces between the cells in body tissues. Edema is a symptom rather than a disease in and of itself, so some detective work needs to be done to rule out potential causes one by one. Edema can be localized, due to obstruction, increased blood pressure in the veins or increased permeability of blood or lymph vessels. Regardless of the cause of edema, it often shows up first or only in the legs of ambulatory people. That's the result of gravity, which is made worse by standing or sitting with the back of the legs compressed.
Ankle edema is one of the earliest signs of a condition known as chronic venous insufficiency.
This disorder is a result of damage to the valves of the deep veins of the legs, and it is often caused by physical injury to the leg or inflammation of the veins of the lower leg. Venous obstruction may also contribute. You may want to visit a cardiovascular specialist and ask about these conditions. Congestive heart failure can also cause edema in the lower extremities. If you have other symptoms or family history of cardiovascular problems, I suggest you check that out immediately.