I've lived with swollen feet and later ankles for 10 years. It started when I crossed over from pre-diabetes to type 2 diabetes. It worsens when it's hot. Taking vitamin B5 helped a lot last year in addition to a multivitamin and a B-complex. The combination greatly reduced swelling over the summer.
This year I'm just taking a multivitamin and B complex so it may not be enough.
I have inflammatory bowel disease, though in remission 95% of the time, I don't seem to absorb nutrients well so have taken a B-complex my entire adult life. However, it alone doesn't work as well as adding the vitamin B5 like I did last year.