It happened to me too!
My son was around that age when I began having similar symptoms. I was on meds for joint pain, pain meds and even hospitalized several times for migraines. I had Celiac disease as well as CF! It was found by chance by a GI and an Endocrinologist. My CF docs kept telling me my CF was just progressing and that these things were normal and I knew it wasn't! Get checked for Celiacs immediately, there's a blood test but an upper endoscopy is really the gold standard of tests. I had never connected things I was eating to the pain because the pain was so constant I didn't see a correlation, but three weeks Gluten free and I felt like I had my life back! There were times I felt helpless and in too much pain to snuggle my baby and it was a level of heartbreak no doctor could understand. It's been three years now since I was diagnosed and follow up GI tests show my intestines are healed and even though I miss gluten I wouldn't trade quality time with my babies for a donut. A lot of CF docs don't check for Celiacs because they are taught that Celiacs symptoms are GI related so they only refer patients to be tested if typical CF treatments for GI symptoms aren't working. For me, I had barely any GI issues and once they upped my enzymes those symptoms went away but then the migraines and joint pain started.
I hope you can get tested and if that's not it, keep searching. We all know when something isn't right even if doctors don't have a clue.