I think they would be fine in a five gallon as long as its not a permanent home, but I wouldn't go more than five at one time. I'm not sure about the sand, as I use very smooth gravel that I've had for a very long time.
I don't think they would eat Betta food, and I don't feed any of my fish flakes. The best things for them are Omega One Shrimp pellets and/or some kind of catfish wafer. I use both the Shrimp pellets and Hikari Sinking Wafers made with Spirulina, Silkworms, and Krill. They both sink to the bottom so its easy for them to get, though the Shrimp pellets don't always sink immediately. But my shoal of five has done very well with them.