I go to a small private university where students have a slightly different relationship with their professors than would be possible elsewhere. Not only do I know my recommenders well, I also know their families.
I'm planning on buying a gift for both professors, not just for writing my LORs, but for everything they've done (advising me in undergrad, discussing schools and career options, etc.).
I don't think buying a gift is expected, but I certainly don't believe it is in bad form either. It's a simple way to express appreciation. What's wrong with that?