There are many possible reasons why your leg might suddenly become swollen. If the swelling is accompanied by pain, warmth, redness, or other concerning symptoms, you should seek medical attention right away, as this could be a sign of infection or other serious condition. However, if the swelling is mild and without any other concerning symptoms, there are a few potential causes that you can explore on your own.
One possibility is that you have developed a blood clot in your leg. Blood clots are more likely to occur when you are sedentary for long periods of time (such as during a long flight), when you have certain medical conditions that affect blood clotting (such as obesity or cancer), or when you take certain medications (such as birth control pills). If you think you might have developed a blood clot, it's important to seek medical attention immediately, as they can be very dangerous if left untreated.
Another common cause of leg swelling is fluid retention, also known as edema. This can happen for a variety of reasons - pregnancy, taking certain medications (such as hormone replacement therapy or steroids), being overweight or obese, standing for long periods of time without moving around much, or even simply eating too much salt. If your leg swelling is due to fluid retention/edema, it will typically resolve on its own within a few days with some simple lifestyle changes such as elevating your leg when resting and avoiding salty foods. However, if the swelling does not go down after several days or becomes worse over time, it's important to see a doctor to rule out any other potential causes.
In rare cases, sudden leg swelling can also be caused by lymphoedema - an abnormal accumulation of lymph fluid in tissues outside of the lymphatic system. Lymphoedema can be present at birth (congenital) or develop later in life (acquired) due to damage to the lymphatic system from surgery/radiation therapy for cancer treatment/infection/trauma. While there is no cure for lymphoedema, it can be managed with treatments such compressive wraps/garments and manual lymphatic drainage massage