My betta Skyden, (my favorite

) is acting strangely right now. He'll swim around normally, flaring at anything that walks past him (as usual, nothing new since I've got him) and then he'll swim towards the top, and float on his side a bit for a minute. Then he'll swim around and act normal again. This keeps going on over and over again. He'll swim around for about 2 minutes normally, then lay on his side at the top again for about a minute. I changed his water today, but this was at about 8 o'clock, and he was normal for a long time until I just checked on him again at about 11:45. Please help, I'm not sure what to do. Like I said, he was normal for 2 hours, so I don't think it's the water.. He ate, but I only fed him 5 pellets today, 6 yesterday (because I didn't feed them for a day)
Please please help. :/