I think Tartan's idea is brilliant, whatever you want to call it, but probably you should get some of the bumpy fabric that's used for the soles of kid's feet pajamas - available at fabric stores - and sew that on so it will be less slippery. And of course make sure the hat fits snugly so that it doesn't cause a tripping hazard. Maybe some stick-on velcro on the cast and sewn on the inside of the hat would help to keep it where it belongs.
Wishing your hubby a speedy recovery!