The results established in contemporary statistical physics indicating that, on very small space and time scales, the entropy production rate may be negative, motivate a generalization of continuum mechanics. On account of the fluctuation theorem, it is recognized that the evolution of entropy at a material point is stochastically (not deterministically) conditioned by the past history, with an increasing trend of average entropy production. Hence, the axiom of Clausius–Duhem inequality is replaced by a submartingale model, which, by the Doob decomposition theorem, allows classification of thermomechanical processes into four types depending on whether they are conservative or not and/or conventional continuum mechanical or not. Stochastic generalizations of thermomechanics are given in the vein of either thermodynamic orthogonality or primitive thermodynamics, with explicit models formulated for Newtonian fluids with, respectively, parabolic or hyperbolic heat conduction. Several random field models of the martingale component, possibly including spatial fractal and Hurst effects, are proposed. The violations of the second law are relevant in those situations in continuum mechanics where very small spatial and temporal scales are involved. As an example, we study an acceleration wavefront of nanoscale thickness which randomly encounters regions in the medium characterized by a negative viscosity coefficient.