Here's a paper on the topic:
"Spontaneous knotting of an agitated string" [1]
From the abstract: "We performed experiments in which a string was tumbled inside a box and found that complex knots often form within seconds. We used mathematical knot theory to analyze the knots."