When I notice a fish acting strangely, the first thing I do is observe the others in the tank. Are they all acting strangely? Or just that one?
If they are all acting as though they are in distress, there could be something wrong with their environment. The heater might have malfunctioned and is either getting the water too hot or allowing it to grow cold. If painting occurred nearby or a carpet was cleaned or cleaning vapors got into the air, their water may have become contaminated.
In that case, the best thing to do is fix the problem (for example, if the heater is malfunctioning) and change some of the water (if it has become contaminated.)