I think, and don't hold it as fact, that if he has internal parasites, he's not getting the proper sustenance and nutrition he needs, so that behavior is him trying to find a way to get to food. At least, that's what my snakes do when they are hungry. Cruise the tank, mess with the lid, etc.