This paper proposes a simple mathematical model of non-stationary and non-linear stochastic dynamics, which approximates a (globally) non-stationary and non-linear stochastic process by its locally (or ‘piecewise’) stationary version. Profiting from the elegance and simplicity of both, the exact mathematical model referred to as the Ornstein–Uhlenbeck stochastic process (which is globally stationary, Markov and Gaussian) and of the Lyapunov criterion associated with the stability of stationarity, we show that the proposed non-linear non-stationary model provides a natural extension of the Onsager–Machlup theory of equilibrium thermal fluctuations, to the realm of non-stationary, non-linear and non-equilibrium processes. As an illustrative application, we then apply the extended non-equilibrium Onsager–Machlup theory, to the description of thermal fluctuations and irreversible relaxation processes in liquids, leading to the main exact equations employed to construct the non-equilibrium self-consistent generalised Langevin equation (NE-SCGLE) theory of irreversible processes in liquids. This generic theory has demonstrated that the most intriguing and long-unsolved questions of the glass and gel transitions are understood as a natural consequence of the second law of thermodynamics, enunciated in terms of the proposed piecewise stationary stochastic mathematical model.