The severity of the burn as well as how the sunburn and swelling are treated will all impact how long your feet, legs, or ankles are likely to stay swollen.