Lol, he hid where the themoter was and when I decorated his take he is hiding in the fake plants. I think he was just afraidAmmonia? I know many types of fish who will go to the surface and gasp for two reasons: air, and ammonia. Lack of oxygen is not as common for bettas unless you have the top sealed off! So it could probably be ammonia.
1. how big is your tank?
2. what do you add after water changes?
3. how old is your betta?
4. how long have you had him?
5. does he live with other fish?
6. when did he start this behavior?