I've had this same problem twice also. First time, it resolved in a couple hours. I had no idea as to it's cause. PH: OK. Ammonia: OK. Tank parameters: 55 gal, temp 76, ph: 6, fish: apistos, cardinals, angelfish, killies. I use Flourish excel and trace elements. SunSun canister filter with UV. Change 25% water per week. Have an air pump which runs on a timer, comes on at night.
Second time it happened fish showing rapid respiration, some breathing at top.
I thought, OK, what have I done to my fish, or, what am I not doing? The only think I could think of: During the day, after the pump is off, there is little water flow from the canister. So, while the fish were in distress, I turned on the air pump, jacked it up, created rapid water movement at surface. Two hours later: fish back to normal. I now run the air pump much stronger at night, create excellent water movement, turn off when I dose with Flourish in the AM, and my fish have been doing fine.
I cannot think of anything else it might be: nitrogen problems don't exist in my tanks, I'm too careful. Have two other tanks with identical water parameters the only difference filters provide good water movement. Never had this happen in the other tanks. 20CC, you write that you are somewhat new to the hobby. The only advice I give to a new fellow hobbyist: Be aware of the dangers of ammonia!! Never overfeed your fish, they should practically eat everything before it hits the bottom of the tank. Doesn't hurt to keep the fish a little hungry all the time. I learned the hard way 30 years ago.