Sounds like a swim bladder problem. To rule out dropsy do the scales stand out giving a pine cone effect?
For dropsy, stop feeding for 3 days and then feed boiled, squashed, shelled peas for a few days and see if this makes any difference. You maight have to hand feed him as he may not be able to feed properly. High nitrate also makes this condition worse and you should check what level this is at.
If he does recover then usually you cant feed flake again and you can get sinking pellets that stop them feeding from the top taking in air.