When my betta jumped out he lied on the carpet till he wasn't very wet anymore. When I found him and put him in his tank he went straight to the bottom and was on his side not swimming. So I cupped him and gave him only a little water so he wouldn't be far from the surface. As he gained energy back and could swim I slowly rose the water level and put him back in his tank the next day.
So, I think if you give him a little time and put him in a lower water level if he is struggling to get to the surface he should be back to normal soon enough. I wish your fish good luck recovering!