In light of applications to relaxed problems in the calculus of variations, this paper addresses convex but not necessarily strictly convex minimization problems. A class of energy functionals is described for which any stress field sigma in L-q (Omega) with div sigma in W-1,W-p' (Omega) belongs to W-loc(1,q)(Omega). The condition on div sigma holds, for example, for solutions of the Euler Lagrange equations involving additional lower-order terms. Applications include the scalar double-well potential, an optimal design problem, a vectorial double-well problem in a compatible case, and Hencky elastoplasticity with hardening. If the energy density depends only on the modulus of the gradient, we also show regularity up to the boundary.