Bladder weakness and incontinence with flare ups

Hi Im 52 female and have had Rheumatoid Arthritis for 22 years Just before a flare up I have noticed that I start getting bladder weakness and incontinence. This clears up as soon as the flare settles down. Initially I thought it has to be stress incontinence due to giving birth to my children and did pelvic floor exercises including Kegels but still had no control during a flare up. It might be due to fibromyalgia but I dont know what to do about it. I have tried medications but it doesnt work when Im not well (just when I actually need them to work). Has anybody else had similar issues?