There are two approaches to non-equlibrium statistical mechanics: one using stochastic processes and the other using dynamical systems. To model the global dynamics of eternal inflation one usually adopts a stochastic description, which is known to suffer from serious conceptual problems. To overcome the problems and/or to gain more insight, we develop a dynamical systems approach. More precisely, we apply the so-called thermodynamic formalism to study equilibrium measures over cosmological trajectories given by a variational principle. The formalism is known to be useful for describing open dynamical systems, such as thermostats, yet it was never considered in the context of gravitational systems. The unfamiliar feature for such systems is that the local phase space trajectories are constantly injected due to the presence of cosmological horizons. We argue that the effect of horizons can be modeled as a time reversal evolution of dynamical systems with escape, whose equilibrium measures are understood fairly well. A key assumption that goes into analysis is the chaotic hypothesis, which is a natural generalization of the ergodic hypothesis to non-Hamiltonian systems.