Yes, allergies can indirectly cause leg pain. Allergens in the air trigger an immune response in the body, leading to inflammation. This inflammation can manifest as stiffness, soreness, and even muscle pain in the legs.
For example, researchers have noted allergy symptoms like "muscle tightness, low back pain and muscle pulling" with hamstring and nuchal muscle discomfort and sharp pain.
It's important to note that leg pain can also be caused by other factors, so it's always best to consult with a doctor to determine the underlying cause.