could be so many things..I have no idea how large the worms where --how old the lizard is---what your environemnt is like...you're there and I'm here.
The only thing I know is that the worm thing is a myth.
read this:
from agamainternational.com
3. I've heard that if you don't crush the heads of super meal worms, they will eat their way out of the stomach of my lizards.
"DON'T BELIEVE all that NONSENSE people are saying or writing. Who in nature will be there to prepare the food that way for the lizards? I feed millions of superworms, and NEVER crush any heads. What big nonsense that is! (I do not sell superworms any more, so I am not biased in telling you this.)
What can happen, however, is the following: indoors lizards get (even with
UVB lights) a fraction (10% or so, depeneding on many factors of the light) of the
UVB light which they receive in the real sun. When they also get a diet low in Calcium, then their bones and muscles get weak. If then they see a large prey item, they THINK they can swallow it as all there forefathers could, and that is what is in their minds. However, because of their weak skeleton and weak muscles, the animal cannot handle that prey and may die from it. If that happens, then the insect is not to blame, but only the caregiver that failed to give enough
UVB and calcium.
If the worms eat their way out of a lizard, then you must watch out not to swallow a seedpit of a grape, as maybe grapes will grow out of your ear. Tell that to the people who come with these silly stories. Complete nonsense. What must have happened is that an animal has died and that then loose hungry worms start eating from it, which then is misinterpreted by the observer. I never saw an insect eating his way out. Never in 30 years."