One easy thing to try is running a double thickness of elastic thread in a matching color through the ribbing all around the brim. You can do this in 2 or 3 places depending on how deep the ribbing is.
It works fairly well although the elastic eventually gives out and has to be replaced. A more permanent solution, but more time consuming is to cut the hat at the brim and reknit the ribbing from where it joins the hat to the end. Sort of like this treatment for a sweater.