The rearrangement inequalities of Hardy-Littlewood and Riesz say that certain integrals involving products of two or three functions increase under symmetric decreasing rearrangement. It is known that these inequalities extend to integrands of the form F(u_1,..., u_m) where F is supermodular; in particular, they hold when F has nonnegative mixed second derivatives. This paper concerns the regularity assumptions on F and the equality cases. It is shown here that extended Hardy-Littlewood and Riesz inequalities are valid for supermodular integrands that are just Borel measurable. Under some nondegeneracy conditions, all equality cases are equivalent to radially decreasing functions under transformations that leave the functionals invariant (i.e., measure-preserving maps for the Hardy-Littlewood inequality, translations for the Riesz inequality). The proofs rely on monotone changes of variables in the spirit of Sklar's theorem.