There’s paper I can't find at the moment that analyzes
the probability of a length of string tangling in your pocket in an hour as a function
of its length. They found that a string of 23cm or more will probably form a knot within the first hour.
Your headphones are longer than that and have three ends instead of two, so the probability they will remain untangled for an hour is even lower.
Back in 1989, Nicholas Pippenger wrote a paper about knots in random walks
. What he showed is that if you have a random walk on the 3D lattice, the probability of that walk forming a knot goes to very, very quickly.
There has been other work on knots in random walks since then, and the common thread seems to be that knots form much more readily than you think they do. If your earphones are jostling
around in your pocket at all, the probability that they will tangle is high.