You can use an cable organizer to prevent your headphones from getting tangled, but if you use iPhone 5/5s, the following TurtleCell 101 iPhone 5s case with retractable headphones may also be a nice solution.
The TurtleCell 101 is a versatile protective case designed for iPhone 5/5s. The iPhone 5 case measures 5.85 x 2.60 x 0.55 inches, weights 5.78 ounces, and as shown in the images, TurtleCell 101 sports a pair of integrated headphones with an in-line mic that features 5Hz-21kHz frequency response, 250ohms impedance and 115dB sensitivity in order to produce high-quality audio, and built-in cable organizer with a retraction button allows to neatly rewind the headphone cable back into the protective case for safe storage. Moreover, the iPhone 5s case is made from ABS and polycarbonate to protect your iPhone 5/5s from bumps and scratches.
The TurtleCell 101 iPhone 5s case comes in four colors and is priced at $39.95 (pre-order sale). If you need it, jump to TurtleCell official site for detailed description.