  Modified gravity theories with geometry - matter coupling, in which the
action is an arbitrary function of the Ricci scalar and the matter Lagrangian
($f\left(R,L_m\right)$ gravity), and of the Ricci scalar and of the trace of
the matter energy-momentum tensor ($f(R,T)$ gravity), respectively, have the
intriguing property that the divergence of the matter energy - momentum tensor
is nonzero. In the present paper, by using the formalism of open thermodynamic
systems, we interpret the generalized conservation equations in these
gravitational theories from a thermodynamic point of view as describing
irreversible matter creation processes, which could be validated by fundamental
particle physics. Thus particle creation corresponds to an irreversible energy
flow from the gravitational field to the created matter constituents, with the
second law of thermodynamics requiring that space-time transforms into matter.
The equivalent particle number creation rates, the creation pressure and the
entropy production rates are obtained for both $f\left(R,L_m\right)$ and
$f(R,T)$ gravity theories. The temperature evolution laws of the newly created
particles are also obtained. In the case of the $f(R,T)$ gravity theory the
open irreversible thermodynamic interpretation of a simple cosmological model
is presented in detail. It is also shown that due to the geometry--matter
coupling, during the cosmological evolution a large amount of comoving entropy
could be produced.
