  We show that the data needed for the method of the embedding tensor employed
in gauging supergravity theories are precisely those of a Leibniz algebra (with
one of its induced quotient Lie algebras embedded into a rigid symmetry Lie
algebra that provides an additional "represtentation constraint"). Every
Leibniz algebra gives rise to a Lie n-algebra in a canonical way (for every
$n\in\mathbb{N}\cup \{ \infty \}$). It is the gauging of this
$L_\infty$-algebra that explains the tensor hierarchy of the bosonic sector of
gauged supergravity theories. The tower of p-from gauge fields corresponds to
Lyndon words of the universal enveloping algebra of the free Lie algebra of an
odd vector space in this construction. Truncation to some $n$ yields the
reduced field content needed in a concrete spacetime dimension.
