What should you do if your betta was eating his food and then suddenly stopped?

Hey there mate, Id give the water a pH test first and see if its ok. If it is u can always try to give him something else like blood worms for a change. And if that doesnt work maybe get ur self some drops that are made especially for bettas that have vitamins and minerals to help ur betta not to stress out.