I believe that a piecewise smooth extremum would have to satisfy the [Weierstrass-Erdmann corner conditions][1]. If these conditions ensure that the extremum is in fact $C^1$, then it solves the Euler-Lagrange equations everywhere. At this point one can appeal to the regularity of solutions of ODEs, which can easily get you $C^2$ or even higher smoothness, depending on the regularity of the functional form of the ODE itself.

For more generality, look up the sufficient conditions for a *strong* variational extremum (starting at Weak and Strong Extrema [here][2]).


  [1]: http://eom.springer.de/w/w097460.htm
  [2]: http://eom.springer.de/v/v096190.htm