The use of the idiom in this situation would be something like "If industrial hemp production is allowed in the United States, I'll eat my hat.", meaning that you don't think it will ever happen.
So I was joking that if it did become legal, because of your appreciation for the material, at least the hat you would have to eat would be made out of hemp.