If they are in a big tank they get stressed out because they are territorial and they are always patrolling and defending what they think is their territory, and if they have a giant tank they will get too occupied and wont eat, and will act quite weird especially if you have other fish, he will get very upset.
Not really true. It's OPEN space they dislike. Not large spaces in and of themselves . If such a space is filled ( and I do mean filled not just a couple ) with plants to hide in and more importantly rest on, an the betta is acclimated to a large tank properly instead of just being floated in a bag for a bit, then sulking and hiding is very much reduced.
OP - 5 gallons is enough for your betta. It is
not enough for anymore
fish than that. Adding any more will put too much stress on your filter and make your water very hard to maintain and keep your fish healthy.
Also, there will not be anywhere near enough swimming space. Most small fish like tetras and so on like to be in groups, the more the better. And you don't have space in there for such a group, as they like long , larger tanks to course up and down and behave as a school/shoal.
Leave him as he is with no
fish tankmates.
However you could see about adding some invertebrates like adult cherry or amano shrimp to your tank. Shrimp are interesting things to watch, and also produce very very little waste so they are much better for tankmates and wont clog your filter with waste.
Snails are also a thought. A single apple snail or a couple of nerites may work.