There are more reasons for leg swelling and pain, which may be caused by a large amount of exercise, trauma, myofasciitis and other reasons. 1. A lot of exercise: it may be due to walking long distances, climbing mountains and other sudden large amount of exercise, causing the leg muscles to produce too much lactic acid, stimulating the muscles, causing leg swelling and pain. 2. Trauma: It may be due to external factors or incorrect walking posture, such as contusion, fall, ligament strain and so on. It causes soft tissue injury in the leg, which can lead to local congestion and leg swelling and pain. 3. Myofasciitis: due to acute sprains or strains on the legs, the leg muscles become aseptic and inflamed, leading to swelling and pain in the legs. It is recommended to consult a doctor for further examination, to clarify the cause with the help of the doctor, and to carry out targeted treatment or therapy when leg swelling and pain occurs.