Wow ! This is really odd! Ive never seen anything like this. But I am going to take a shot at what MIGHT be causing it. It could be the food. That is a possibility. But do you put and chemicals in there? Any bew ones that could be having reactions?
It was some I got at Aquatic World, a pet store near me(probably their own mix), it wasn't a specific sort, it was the only pellets I can get so far, nobody really stocks it.
I was giving them flakes, but it made my male betta's tummy swell up, overfeeding I guess.
With the pellets I can control more how much they eat...