I asked myself that exact same question when I received my first piece of physical "merchandise" as a gift from a friend (because daydreaming like that is fun)!
It's not something I expect to ever be relevant to me, but if I were to achieve that level of popularity, I'd like small creators (e.g. those who are mostly trying to cover the cost of the booth, travel expenses, and earn a small side income) to reach out to me and ask for permission, which I would be happy to grant in exchange for a set of the merchandise being sold. <3
My own experience in working with more commercial approaches hasn't been great, so if someone wanted to sell stuff on a larger scale, it'd be a case by case thing. Copyright laws and differences in international law are insanely difficult though, so I'm not sure how much can be done even if you're against it (at least without a company backing you). It's kind of an "I'll worry about it if it ever happens" question for me.
If it happened by chance, without my prior knowledge, while I'm walking through an artist alley... Again, case by case. It's not entirely unlikely I'd introduce myself as the author, ask if I can have the set for free, and then camp at the booth for hours because I can't shut up about my characters (lol)