If the water temperature is too hot or too cold, or its pH is not right or other parameters are off-balance, then your fish may not swim much and might simply stay in place. However, sometimes they don't move just because they're resting.