My wife has been having pain in her lower leg recently and now it seems to be swelling slightly. Ibeuprofen seems to help both?

Get it checked out. A painful swollen leg is absolutely worthy of investigation. Possibilities can include a blood clot, muscular injury, ruptured bakers cyst, or swelling from insuffiency of the veins. It should be evaluated right away.
Ibuprofen helps. I agree with dr. Schnur's thoughts and recommendation. All of those things can cause pain and swelling and Ibuprofen will help the pain and swelling that mjight be assocaited with any of the things he mentioned.