Three years is pretty old for a betta, so the change might be harder on him than most fish.... they're also pretty intelligent/sensitive fish so he might just be some kind of depressed/totally freaking out completely.
Also 5 gal is still really small, why not a 10?