Its a parasatic issue and a good indication that something is wrong. Do u notice any white dots on fishes? Did u let the bag float in your tank for 30minutes, so the temperature is not drastic to the fishes? Check ur water parameters, specifically nitrite-nitrate-ammonia.
It could be the following:
1)
It is most likely ick/ich, and you see this behavior before the white spots show up. I would treat the tank now for it, and maybe you can clear it up fast. The itching starts, then a day to days later the spots will come. After they start showing the spots, its harder to clear the problem up. The spots stay for a while, then fall off into the tank and infest the water. Then it takes several treatments to clear it up. It can be parasites under the scales or in the gills, and won't hurt to treat with a multi product that takes care of several things in one treatment.
2)
It is a sign that their gills are irritated. This is usually from climbing levels of ammonia, so complete a daily water change for a week and watch your fish closely. If they stop, then that is what it was. If it continues, then I would treat for fungus, using heat and salt. Good Luck!