I whipped this up (okay, knitted) one night when I decided I needed something to control the cord on my earbuds.
The yarn I chose was a sport weight (2 Fine) by Lion Brand that had some sparkle to it. I used size 2 or 3 needles.
I cast on 24 stitches loosely. I knit about 12 rows in a 2x2 rib (knit two stitches, purl two stitches, repeat across). Bind off loosely in rib pattern. Weave in loose ends.
You could use other yarn or other needles or a different stitch pattern. This is just what I did and it worked for me. I chose the rib to make it have an elastic quality.
My finished product was about 1 1/4" by 2 1/2".
Then I took some thin black elastic about 5 1/2" long and folded it in half. You might want to tie a knot at the very end to hold the two cut ends together. Sew that to one end of the knitted piece so that it lays across the whole piece. Sew it on securely so that it doesn't come off when you pull on it. This I where that knot might come in handy.
See a button on top of the end of the elastic. I used a 3/4" button. Use any size you want. It just has to be big enough to hold your elastic.
And now it is time to wrap up your unruly cord. I wrap mine around my fingers, then wrap the knit wrap around that.
I hope it works for you. Enjoy!