Nondeterministic giant waves, denoted as rogue, killer, monster, or freak waves, have been reported in many different branches of physics. Their physical interpretation is however still debated: despite massive numerical and experimental evidence, a solid explanation for their spontaneous formation has not been identified yet. Here we propose that rogue waves \more precisely, rogue solitons (RSs)\ in optical fibers may actually result from a complex dynamical process very similar to well-known mechanisms such as glass transitions and protein folding. We describe how the interaction among optical solitons produces an energy landscape in a highly dimensional parameter space with multiple quasi-equilibrium points. These configurations have the same statistical distribution of the observed rogue events and are explored during the light dynamics due to soliton collisions, with inelastic mechanisms enhancing the process. Slightly different initial conditions lead to very different dynamics in this complex geometry; a RS turns out to stem from one particularly deep quasi-equilibrium point of the energy landscape in which the system may be transiently trapped during evolution. This explanation will prove to be fruitful to the vast community interested in freak waves.