What would be the cause for swelling in legs and ankles for a 49 year old male?

Rule out. Swelling can be caused by many reasons. You should rule out serious conditions such as cardiac, pulmonary or renal pathology. See your primary care physician.
Leg Swelling. Swelling in both legs usually is due to excess salt water (edema). There are many possible causes, some need addressed quickly, others are long term issues. Some of the causes of this problem are heart disease or failure, cirrhosis, chronic kidney disease, nephrotic syndrome, dvt/blood clots, lypmphedema, and the list goes on. If leg swelling is a new problem it should be evaluated by a physician.