I've never heard of this, but here's a helpful article: https://idreamofclean.net/coffee-grounds-used-as-a-deodorizer/
used (dry) coffee grounds work fairly well -- the beans have a waxy coating ... and are too expensive to use this way ... saucers of baking soda, lumps of PLAIN charcoal ( not the 'quick lite' kinds), or little bowls of white vinegar are all a better option ...
You can place them in an open dish. Another deodorizer is plain charcoal. Not as attractive but you could place above or below eye level.
My Dad was in the hospital several years ago and there was a foul odor in the room. The nurse told us that they couldn't use any aerosol products because of fumes in the air, not good for patients with lung or allergy issues. She put some coffee (ground) in a coffee filter and placed it on the heat register. It worked. Made the room smell great.
Fill a small container with coffee beans, wedge a tea light candle on top by poking it down even with the top of the beans. Light the candle. Looks very pretty if you use a small antique cup and saucer as your container.