  We prove an analog for integrable measurable cocycles of Pansu's
differentiation theorem for Lipschitz maps between Carnot-Carath\'eodory
spaces. This yields an alternative, ergodic theoretic proof of Pansu's
quasi-isometric rigidity theorem for nilpotent groups, answers a question of
Tim Austin regarding integrable measure equivalence between nilpotent groups,
and gives an independent proof and strengthening of Austin's result that
integrable measure equivalent nilpotent groups have bi-Lipschitz asymptotic
cones. Our main tools are a nilpotent-valued cocycle ergodic theorem and a
Poincar\'e recurrence lemma for nilpotent groups.
