We introduce the geodesic flow on the leaves of a holomorphic foliation with leaves of dimension one and hyperbolic, corresponding to the unique complete metric of curvature −1 compatible with its conformal structure. We do these for the foliations associated to Riccati equations, which are the projectivization of the solutions of linear ordinary differential equations over a finite Riemann surface of hyperbolic type S, and may be described by a representation ρ:π1(S)→GL(n,ℂ). We give conditions under which the foliated geodesic flow has a generic repeller–attractor statistical dynamics. That is, there are measures μ− and μ+ such that for almost any initial condition with respect to the Lebesgue measure class the statistical average of the foliated geodesic flow converges for negative time to μ− and for positive time to μ+ (i.e. μ+ is the unique Sinaï, Ruelle and Bowen (SRB)-measure and its basin has total Lebesgue measure). These measures are ergodic with respect to the foliated geodesic flow. These measures are also invariant under a foliated horocycle flow and they project to a harmonic measure for the Riccati foliation, which plays the role of an attractor for the statistical behaviour of the leaves of the foliation.