Oh dear.. the poor thing..
He's not well. You'll have to work fast to help him. Lower the water if he is having trouble reaching the top. I'm sure he has fin rot. It can be caused by all kinds of things, stress, poor water conditions, an injury, so in this case it might be hard to pinpoint what caused it, but we can try to fix it and prevent it later on.
Now that he's in the smaller tank, you should dose him with Aquarium Salt. It'll have a guide based on your tank size, so you need to know how big the tank is, but 1 teaspoon of aquarium salt per gallon of water is what I use. You want to place the salt in a cup with some tank water and mix it til it's dissolved. ((I use very hot water to make sure it all dissolves fully and then wait til it was cooled to room temp before pouring it into the tank. But don't do this if you don't feel comfortable with it.)) You want to get a heater for the tank and make sure it stayed at 78 and put him in a calm, dark place.
Every day you need to change his water 100% and add salt again. Don't overlap the water. New water, new salt, every day! Don't overlap the water! New water, new salt, every day! This should last for 7-10 days but NO MORE. Don't skip a day! After the last treatment, make sure he has fresh, clean, unsalted water to swim in and change the water often.
There is the problem with him laying on his side, however....
If he's swimming upside down and on his side, or "standing up" or nose down, vertical, he could have Swim Bladder Disorder. This is a little different and harder to treat. I would start with the salt and give it 24 hours. He should be doing better, if not you'll have to get medications. The problem is, it might not be SBD, and I have my doubts because you're not feeding him enough, so he doesn't have a chance to get bloated.
You should be feeding him twice a day, 2-3 pellets at a time. A betta has a stomach about the size of his eye and you have to be careful not to over feed him. If you're going to give him bloodworms, replace his pellets for bloodworms for that feeding. Feeding him more often might perk him up more then anything else. I'd say with that feeding schedule, he's doesn't have much energy. Which means he can't fight off illness very well.