Mealworms are not a good feeder insect for young dragons, especially if their overall length is under 10". They can cause impaction and really don't have enough nutrition on their own. It would be best to switch to crickets, small silkworms, butterworms, young roaches or even freshly molted small superworms.
The twitching sounds like it could be caused by impaction but it can also be caused by metabolic bone disease. To be sure, need to know more about your setup. What are your basking temps, substrates, do you have a UVB light? How often do you feed him, what do you feed him (other than mealworms) etc. Do you use any suppliments? What kind and how often do you use them? Has he been pooping regularly before regurgitating? Has he since?
Soaking in luke warm water can help with the impaction by giving the dragon a chance to hydrate himself and easing passage of stool. If he doesn't improve in a couple days, I suggest getting him to a qualified herp vet.
-----
PHLdyPayne