I’m glad your bun is okay! I had the same experience a few months ago with my bunny’s behavior, which is textbook GI stasis (not eating or pooping, lethargic, hunched, pressing stomach to the ground). When this happens to bunnies, they generally need a pain reliever, something to get the gut moving, fluids, and food. (In case you ever need specifics, the vet prescribed him Meloxicam, Cisapride, and Reglan.)
In case this ever happens again, I’ve been told to have simethicone (infant gas reliever) on hand to prevent an episode of gas discomfort from turning into full-blown GI stasis. And of course, you want to have Critical Care and a syringe available before an emergency. GI stasis is very common and treatable as long as you act quickly.
Good for you for recognizing the change in your bunny’s behavior so quickly!