A theory of iterated averaging is developed for a class of highly oscillatory ordinary differential equations (ODEs) with three well separated time scales. The solutions of these equations are assumed to be (almost) periodic in the fastest time scales. It is proved that the dynamics on the slowest time scale can be approximated by an effective ODE obtained by averaging out oscillations. In particular, the effective dynamics of the considered class of ODEs is always deterministic and does not show any stochastic effects. This is in contrast to systems in which the dynamics on the fastest time scale is mixing. The systems are studied from three perspectives: first, using the tools of averaging theory; second, by formal asymptotic expansions; and third, by averaging with respect to fast oscillations using nested convolutions with averaging kernels. The latter motivates a hierarchical numerical algorithm consisting of nested integrators.