I've seen snakes twist, spin, corkscrew, and stargaze from:
-Respiratory Infection
-Dry shed
-Genetics (Spider ball pythons, Jaguar carpets)
-Black Knight/Provent-a-Mite/Permethrin overdose
-"Heatstroke" for lack of better term
-Kidney/Liver failure from dehydration/starvation (happens in imports sometimes)
-and many other unknown causes
Keep this in mind before diagnosing IBD! IBD also shows many other symptoms besides stargazing and corkscrewing including skin sores/blisters, regurgitation, tumors, and many more.