My headphones are always getting tangled in my pocket, often getting hung up on my keys when I try to take them out. Last week, I tried looking for a case for my iPhone earbuds and finally settled on simply using an Altoids Chewing Gum tin. It's about half as wide as a "regular" Altoids tin and works brilliantly. I think I paid $1.79 for it at CVS.
It even comes with a few days supply of gum too.