Here is what I found:
Inflammatory bowel disease (IBD), which includes Crohn's disease and ulcerative colitis, sometimes overlaps with chronic back pain, including axial spondyloarthritis (axSpA) — an inflammatory form of arthritis.
I sometimes get back pain too but stretching has helped significantly. I would do 20minutes of stretching a day and see if that helps. Exercise in general helps back pain too.
Calcium and vitamin D intake can help too.
In addition to that, definitely watch the eating habits too. Raisin bran gave me the worst possible gas pains, it could be something in your diet.