CHECK YOUR AMMONIA LEVELS -- if they are fine:
Some bettas just don't like the water and prefer places where the grass might be greener.
out of 20, I had one that was so inclined to do the exact same thing. He liked to lodge himself into the power filter outlet, and just lay there. he would always jump down after I would discover him, on his own accord.
Sadly one day he didn't jump off of it the right way, and I wasn't around to find him until he'd already dried out.
i was very sad :(.
it happens. some just .. have that jump mentality..
You could try lowering the water level some, or moving the heater so it makes less of a perch. I would definitely do something about it if it is not related to the ammonia levels.