I am constantly trying to untangle cords and wires. I particularly struggle with headphone wires when I am carrying mine and the kids at the same time. They all become entangled with one another.
A simple (but it takes a very long time to complete – be prepared) solution is to wrap the cords in yarn. Simply tie a knot where you are beginning and start wrapping over the tail of the knot. I could not work with a full skein of yarn – I needed to cut a large portion off and make a ball which was much easier to work with. The biggest difficulty is trying to hold everything tight the entire time. I did step away from the project every now and then and to do that I clamped the loose area off with a paper chip clip.