Not much you can do........ I would wait and pray that he was not hurt too bad..... Taking him out of the tank to a hospital would be too stressful IMO......
I have had this happen to me n the past also with other fish..... Wait and see..... HOw long was he stuck? If only a few minutes maybe this will not be so bad.....
Good Luck.....