Headphones have a trait to jumble into a crazy shape in your pocket, producing alot of anger and time untangling them. When you accidently put them through the wash this annoyance becomes 10 times worse. They usually survive there wet journey but the heat of the dryer usually mold them into this awful shape.
Step 1: The Fix
Although never completely solved this problem can be reduced afterwards with a hairdryer and some time. Start by Untangling your mess as best as you can. Next hang them from any sort of hook. Use a hairdryer on its hottest setting to heat up the headphones traveling slowly up and down the wire while gently stretching the wire into its original form.
It takes time but you should be able to reclaim a decent shape, although its not perfect. Be careful not to ruin your headphone by stretching it to hard. If your headphones don't produce sound your out of luck.
Thanks and maybe sometime ill become responsible enough with my headphone to not have this problem any more :)