Recently there has been growing interest in extending the thermodynamic method from static configurations to dynamical trajectories. In this approach, ensembles of trajectories are treated in an analogous manner to ensembles of configurations in equilibrium statistical mechanics: generating functions of dynamical observables are interpreted as partition sums, and the statistical properties of trajectory ensembles are encoded in free-energy functions that can be obtained through large-deviation methods in a suitable large time limit. This establishes what one can call a ‘thermodynamics of trajectories’. In this paper we go a step further, and make a first connection to fluctuation theorems by generalising them to this dynamical context. We show that an effective ‘meta-dynamics’ in the space of trajectories gives rise to the celebrated Jarzynski relation connecting an appropriately defined ‘meta-work’ with changes in dynamical generating functions. We demonstrate the potential applicability of this result to computer simulations for two open quantum systems, a two-level system and the micromaser. We finally discuss the behavior of the Jarzynski relation across a first-order trajectory phase transition.