Do a water change (probably around 25%) and then get a test kit. Ammonia has probably built up in your tank by now which is why your betta is acting off.
Sorry, I'll explain it better tomorrow but it is really late here and it's a long topic. Maybe google search "fishless aquarium cycle" and read up a bit then I can help you out from there.
20 gallon long: 3 adult Neolamprologus similis + about 11 fry of various ages; low light planted tank
20 gallon long:2 freshwater dwarf puffers (Puff Puff and Poofer); medium-light planted tank
10 gallon: 1 male betta named Wormy; low light planted tank
10 gallon: 1 male betta named Dante; low light planted tank
2, 5.5 gallon tanks that are currently empty (I see more fish on the horizon