Have You Checked the Water Temp?
I inherited a betta from a coworker and he used to do the same thing. In fact everyone used to stop by her desk to see if he was dead! He started looking bad so I brought him home and put a heater in with him and he swims around now like nobody's business. I bought the Hydor small heater from Dr. Foster and Smith. It doesn't have a temperature cage it is just a small flat square that lays under the gravel. It's supposed to bring the temp up about 5 degrees higher than room temp. Which is fine if your room is the right temp but on hot days it can get too hot as it never shuts down. If you have room in your 2.5 gal though I would get a 25 watt heater that actually holds the right temp. and shuts off when it reaches 79-80 degrees.
Also, you didn't mention that your tank is cycled so you may have some ammonia problems. Do you test the water? You should and make sure you do frequent water changes, treat the water for chlorine first, etc. I have found that bettas are not as self sufficient as everyone leads you to believe. They are fish just like any other and if they don't have good water care it will effect them sooner or later.
I am a newbie too but you can learn a lot here...it is a great site!