Fish tend to do that when there stressed, sick or starving for oxygen. First, have you tested your water specifically ammonia and nitrite? What were the readings if you did? Second, what size tank and what kind of filtration to do you have? Lets start with this info first and go from there.