  The goal of this paper is to study the long-time average behavior of the
value function of optimal control problems with dynamics associated with a
family of vector fields satisfying the Lie Algebra rank condition (H\"ormander
condition). For such problems the Hamiltonian fails to be coervice in the
momentum variable. Nevertheless, by a dynamical approach we prove the existence
of a unique critical constant for which the ergodic Hamilton-Jacobi equation
admits solutions. Then, we use such a constant to obtain the limit profile of
the Cauchy problem as the time horizon goes to infinity.
