What kind of worms are you using? Most "worms" should only be used as a treat. Meal worms have a tough exoskeleton that is hard to digest, wax worms are high in fat, hornworms are great for hydration but not good for everyday, butterworms are a treat and so on. I use a variety of them but I stay away from meal worms except very occasionally. Crickets or Dubia roaches are a great staple feeder and then you throw a few worms in for treats.
That being said, it could be several things...he could be bored, he could be about to shed. If all you have been giving him are meal worms, he could be constipated or a number of other things. It's hard to know by just what you have given here.
Please also fill out the how to ask for help for in the health clinic and copy and paste it here with your answers, that will help give us a bigger picture and know more about how to help.