Firstly, yes there is a cosmic law that covers cable entanglement... or at least there are papers that propose one. Such papers do concentrate on cables under a desk becoming spontaneously entangled. However, the principles apply to laptop cables.
One of the key points of the referenced paper is...
Bendebility β and integrated curvature D are correlated roughly
linear. So the number s=D/ β shows less scatter than the other numbers
for given classes of cables that actually group around certain values
In general, we therefore find 0.5 to a few Joule (~3) needed per meter
cable length to cause entanglement, or for an event of 10 s duration a
power of 0.05 to 0.3 W. This kind of energy scale explains why other
linear objects that take more force to bend do not show a tendency to
entanglement. It also explains, why fixed cable boundaries (anchors)
are generally conserved.
Thus, cables are subject to Entropy as all other objects in the universe.
As for how to prevent it, one of the best scientific studies is by the Osaka Gakuin University.
To quote from its conclusions for your case - multiple cables...
B. Multiple cords and cables: To bundle, to combine, and to unite,
To bundle multiple cords and cables at a place The bundle held with
twisting, with tying, with hooking, with fixing in a hole, with
adhesion, within a frame, The bundle held with elastic closure, with
an elastic spiral belt, with a winding tape
B2. To bundle multiple
cords and cables along a certain distance Within a fame, with an
elastic spiral belt, with a winding tape
B3. To combine multiple cords
and cables into a single united cord/cable By braiding, by winding
each other, by attaching side by side, By forming a new united
cord/cable, such as a composite cable, a multiplex cable
In other words, tie your cables together. Although for a laptop, that may not be as practicable as it sounds.