It sounds very much like he's impacted, is it possible he ate something that is causing a blockage, like a piece of plastic plant? I have a rescue I adopted who had severe MBD and the worst mealworm impaction ever, and he continuously strained, squirmed, and snapped his hips trying to pass the blockage, which took a week and a half and 3 huge poops of shells...What is his daily diet? What substrate is in his enclosure bottom? I don't know what you mean by a "panic attack"?
Pedialyte in a
bath does absolutely nothing unless he actively drinks the water through his mouth, they absorb zero
hydration through their vents or skin, so WARM baths serve only to encourage a bowel movement through relaxing their muscles and stimulating their vent area with warmth. You need to start an impaction and
hydration protocol immediately, giving him natural laxative slurries and unflavored Pedialyte THROUGH HIS MOUTH ONLY. After a few slurries by mouth and then a warm
bath after the slurries he should pass a normal fecal impaction of mealworm shells, superworm shells, or loose substrate like any type of sand, crushed walnut shells, gravel, rocks, etc., but if he has a blockage consisting of fake plastic plants or other enclosure decor, or even some very nasty loose substrates like crushed walnut shells, Calcium sand (hardens when wet into cement like rocks), rocks or gravel, etc. then he may need surgery to remove it and repair any internal bleeding caused by it. Also, all of these impaction risks I've spoken of can cause pressure on their spines causing pain, spasms and muscle twitching, paralysis, and death, so the vet needs to be an experienced reptile vet who knows about impactions in bearded dragons and does x-rays and an ultrasound to find the blockage and identify what it is, because some will not pass on their own.
The natural laxative slurries can be made with prune baby food, plain canned pumpkin (from the canned veggie aisle at the grocery store, not pumpkin pie filling but rather raw canned pumpkin that is plain), unflavored Pedialyte, a pinch of Calcium powder and a pinch of multivitamin powder, and even a pinch of Psyllium Husk, which can be bought at Walmart in the laxative/peptobismal aisle in a bottle of capsules that are just plain Psyllium Husk (I have a bottle of the generic Walmart brand on hand at all times for my rescue boy, works wonderfully). Empty a jar of the prune baby food into a microwave-safe container, then add 2-3 tablespoons of the raw, canned pumpkin and then mix it very well. Add a pinch of Calcium powder, a pinch of multivitamin powder, and a pinch of the Psyllium Husk (empty a capsule and add a pinch of the powder). Add in some of the unflavored Pedialyte to the mix to thin it out enough to be able to be dispensed in an eyedropper or oral syringe, and mix it all up very well. Microwave it for a minute, then again mix it really, really well. You want it warm but not hot, and like a baby bottle test it on your wrist. Then drip it on his snout, let him lick it off, drip more, let him lick it off, etc. Give him as much as he'll eat, then let him bask under his UVB and basking lights. Give him this slurry twice daily, he'll get not only the laxative, but also
hydration and electrolytes, some nutrition, and his Calcium and multivitamins. I usually do this twice a day, then the next morning do it again, let them bask again, then give a warmer than normal
bath, and typically after 5-10 minutes in the
bath they'll pass the impaction. But if you're going to the vet today at 4:30 then an experienced reptile vet should run the correct imaging tests to identify the impaction or blockage, and recommend either a similar impaction protocol or surgery if he has a blockage. DO NOT ALLOW THEM TO GIVE HIM ANY MEDICATIONS LIKE ANTIBIOTICS, ANTIFUNGALS, ANTIPARASITICS, OR ANTIPROTOZOANS WITHOUT RUNNING ANY FECAL TESTING, CULTURE AND SENSITIVITY TESTING, OR BLOOD WORK TO ACTUALLY DIAGNOSE AN INFECTION THAT REQUIRES THESE TYPES OF MEDS!!!! A lot of vets, especially "exotics" vets or general vets just give Antibiotic, antifungal, antiparasitics, etc. by injection or orally "just in case" they have an infection, or more often because they don't know what to do or what's wrong, so they prescribe a "broad-spectrum" Antibiotic hoping it might help, or they guess that they might have worms or parasites or a high coccidia count without running any cultures, fecals, or blood work, and just give them the antiparasitic medications, and all of these meds are not only unnecessary 99.9% of the time, they actually make the dragon much sicker than they were to begin with, causing secondary problems on top of the reason you took them in in the first place, which at the end of the appointment is still not diagnosed. ALSO, VERY IMPORTANT, DO NOT LET THE VET DO AN ENEMA!!!! This is a very popular way for "exotics" vets to try to pass an impaction in a bearded dragon rather than surgery or laxative slurries, and usually the bearded dragon dies of being literally drowned by the enema.