Did you acclimate him to the new tank?
My guess would be that he's dealing with some kind of shock from the tank change. Whether that be nitrate shock if you had nitrates much higher in your old tank with the debris than it is now, or rapid temperature change if your old heater not keeping things consistent, it's hard to say.
For now, I'd cup him in a tupperware container or breeder box and float him in the tank. This should make it easier to reach the top. Then turn the light off and keep everything dark.
In the future - it would be wise to know what your water levels are. Fish adapt to their environment, and even if that environment is partially toxic (such as growing nitrates) a very hard, fast change can shock the fish. If Nitrate levels get too high, you wouldn't want to do a 100% change for example....you would want to bring it down slowly with partial water changes over a few days. That is all a guess here - but given you said that the gravel was in a pretty bad state it's the best guess I have to go on.