Just try to keep the water as clean as possible--sometimes these guys get stuck on decor or scrape themselves on plants. Just try to keep it from getting infected by being extra diligent with your water changes and cleanings. Usually with time the gill flap will get back into position and lay flat again. One time I had a fish swim up my siphon tube and get stuck--boy was that a terrible moment! Once I got him out his gill flap stuck out for a couple of days, then went back to being normal. You should take the time to examine your decorations for small holes the betta might have snagged the flap in so that it doesn't happen again.
If you can give us some additional information, that might help us give you some additional advice.