it could be stressed out if the water conditions aren't too good, or if you've had it a while, it might be old, when they know they are going to die they sit at the bottom and wait. i'd test the water first and dont poke him or tap the glass, if he is dying,then at least give him a peaceful death. then if you do see the conditions are out of the ordinary, do water changes and make the weird levels of stuff right, soz im rushing this lolage.
if ur water is fine then he may die, hopefully he's just resting though
i hope this helps and i hope ur fish gts betta
=]