How long was your acclamation time, it could be stress. They also swim like that sometimes, mine sleeps like that. Also was it on its side on the sand or swimming sideways ?
Do you have any powerheads or anything like that pointed at the surface of the water causing water movement on the surface or are they all pointed down into the tank? Really hard to tell, but a safe thing to check is that there is enough oxygen in the water. Accomplish this by making sure the top of the water is getting turned over.