Let $\pi:N\rightarrow M$ be a smooth fibered manifold. Let $m=\dim M$ and $m+n=\dim N$. Assume $M$ to be orientable and oriented. The interpretation is that $M$ is the "spacetime manifold" and the fields in question are smooth sections of $\pi$. Consider the jet prolongations $J^r(\pi)$ of the fibered manifold with projections $\pi^r:J^r(\pi)\rightarrow M$ and $\pi^r_s:J^r(\pi)\rightarrow J^s(\pi)$ for $r\ge s$.
A Lagrangian of order $r$ on $\pi$ can be identified with an $m$-form $L\in\Omega^m_{r,\mathrm{hor}}(\pi)$ on $J^r(\pi)$, which is horizontal with respect to $\pi^r$.
Let's say that an $m+k$-form $\omega\in\Omega^{m+k}_r(\pi)$ on $J^r(\pi)$ is maximally horizontal if there exists a volume form $\mu\in\Omega^m(M)$ (on $M$) and a $k$-form $\omega^\prime\in\Omega^k_r(\pi)$ such that$$ \omega=\omega^\prime\wedge(\pi^r)^\ast\mu. $$
A source form on $J^r(\pi)$ is a maximally horizontal $m+1$-form that is also $\pi^r_0$-horizontal. Write $\mathrm{Src}_r(\pi)$ for the set of all source forms on $J^r(\pi)$. One can establish that $$ \mathrm{Src}_r(\pi)\cong\Gamma((\pi^r_0)^\ast( V(\pi)\otimes_N \Lambda^m(M))), $$
where $V(\pi)$ is the vertical tangent bundle of $\pi:N\rightarrow M$.
This is a good place to consider coordinates. Let $(U,x^i,u^\sigma)$ be a fibered chart on $N$. If $\phi\in\Gamma_{\mathrm{loc}}(\pi)$ is a local section whose range is in $U$, its components in the fibered chart are the functions $\phi^\sigma:=u^\sigma\circ\phi$.
Let $U_r:=(\pi^r_0)^{-1}(U)\subseteq J^r(\pi)$, and for each $0\le|I|\le r$ define $$ u^\sigma_I(j^r_p\phi)=\partial_I(u^\sigma\circ\phi)(p). $$ Here $I=(i_1,...,i_k)$ (if $|I|=k$) is a multiindex. Then $(U_r,x^i,u^\sigma,u^\sigma_i,\dots,u^\sigma_{i_1,...,i_r})$ is a chart on $J^r(\pi)$ (in a slightly generalized sense because the lower indices in $u^\sigma_{i_1,...,i_k}$ are symmetric, so these are not all independent).
Then if $L\in\Omega^m_{r,\mathrm{hor}}(\pi)$ is a Lagrangian, in any one fibered chart it looks like $$ L=\mathcal L(x,u_{(0)},\dots,u_{(r)})\mathrm dx, $$
where $\mathrm dx=\mathrm dx^1\wedge\dots\wedge\mathrm dx^m$ and $u_{(k)}=(u^\sigma_{i_1,...,i_k})$. So clearly this is indeed like a classical Lagrangian.
Then $\Delta\in\mathrm{Src}_r(\pi)$ if and only if in any one fibered chart it looks like $$ \Delta=\Delta_\sigma(x,u_{(0)},\dots,u_{(r)})\mathrm du^\sigma\wedge\mathrm dx. $$
Given a source form $\Delta\in\mathrm{Src}_r(\pi)$, the corresponding source equation is $$ \Delta\circ j^r\phi=0,\quad\phi\in\Gamma_{\mathrm{loc}}(\pi), $$ which in coordinates takes the form $$ \Delta_\sigma(x,\phi(x),\phi_{(1)}(x),\dots,\phi_{(r)}(x))=0,\quad\phi_{(k)}=(\partial_I\phi^\sigma)_{|I|=k}. $$
A form $\omega\in\Omega^k_r(\pi)$ on $J^r(\pi)$ is contact if $(j^r\phi)^\ast\omega=0$ for any local section $\phi$. The set $\mathcal C\Omega_r(\pi)=\bigoplus_{q\in\mathbb Z}\mathcal C\omega^q_r(\pi)$ of all contact forms on $J^r(\pi)$ is a homogeneous and differential ideal in the exterior algebra on $J^r(\pi)$. A form $\omega$ is $k$-contact if $\omega\in\mathcal C^k\Omega_r(\pi)$, i.e. it belongs to the $k$th power of the contact ideal.
One can then introduce maps $p_k:\Omega^q_r(\pi)\rightarrow\Omega^q_{r+1}(\pi)$ which raise the order of forms by one, satisfy $$ (\pi^{r+1}_r)^\ast=\sum_{k=0}^\infty p_k, $$ and they have the property that $p_0\omega$ is horizontal, $p_k\omega$ is $k$-contact, and $p_kp_l=\delta_{k,l}(\pi^{r+2}_r)^\ast$.
An $m$-form $\Lambda\in\Omega^m_r(\pi)$ on $J^r(\pi)$ is a Lepage form if $p_1\mathrm d\Lambda$ is a source form. If $L\in\Omega^m_{r,\mathrm{hor}}(\pi)$ is a Lagrangian of order $r$ and $\Lambda\in\Omega^m_s(\pi)$ is a Lepage form of order $s$, then we say that $\Lambda$ is a Lepage equivalent or Lepage extension of $L$ if $L\cong p_0\Lambda$, where "$\cong$" means that equivalence is meant up to pullback along an appropriate jet projection.
The following can be shown:
- If $\Lambda$ and $\Lambda^\prime$ are both Lepage extensions of $L$ (even if of different order), then $p_1\mathrm d\Lambda=p_1\mathrm d\Lambda^\prime$.
- Every Lagrangian $L$ of order $r$ admits a global Lepage extension of order $2r-1$. It is non-unique however.
Then the Euler-Lagrange operator $$ E:\Omega^{m}_{r,\mathrm{hor}}(\pi)\rightarrow\mathrm{Src}_{2r}(\pi) $$ is defined by $$ E(L)=p_1\mathrm d\Lambda, $$ where $\Lambda$ is any Lepage extension of $L$.
This does implement the calculus of variations for the following reason. If $\Omega\subseteq M$ is a compact domain with boundary and $\phi\in\Gamma_\Omega(\pi)$ is a smooth section on it, then the action functional determined by $L$ is $$ S(\Omega,L,\phi)=\int_\Omega (j^r\phi)^\ast L=\int_\Omega (j^{2r-1}\phi)^\ast\Lambda, $$ where $\Lambda$ is any Lepage extension of order $2r-1$. Since $L-\Lambda$ is a contact form, we could replace $L$ by any Lepage extension. It may be shown that every variation of the section $\phi$ can be described in terms of a vertical vector field $X\in\mathcal D_{\mathrm{vert}}(\pi)$, and then the variation if the action is given by the Lie derivative along the prolongation: $$ \delta_X S(\Omega,L,\phi)=\int_\Omega(j^{2r-1}\phi)^\ast\partial_{j^{2r-1}X}\Lambda=\int_\Omega(j^{2r-1}\phi)^\ast\left[j^{2r-1}X\rfloor\mathrm d\Lambda+\mathrm d j^{2r-1}X\rfloor\Lambda\right]. $$
If we assume the variation has support within $\Omega$, the second term vanishes by the Stokes theorem and the first term can be rewritten as $$ \delta_X S(\Omega,L,\phi)=\int_\Omega(j^{2r}\phi)^\ast\left( j^{2r}X\rfloor E(L)+j^{2r}X\rfloor\mathrm{K}\right), $$ where $\mathrm{K}$ is $2$-contact, so its contraction with the vector field is contact and hence its pullback along the section vanishes, and as $E(L)$ is a source form, $j^{2r}X\rfloor E(L)$ actually only depends on $X$ at each point, so there are no further "integrations by parts" to be done.
In coordinates $$ j^{2r}X\rfloor E(L)=X^\sigma E_\sigma(L)\mathrm du^\sigma\wedge\mathrm dx,\qquad E_\sigma(L)=\sum_{|I|=0}^r(-d)_I\frac{\partial\mathcal L}{\partial u^\sigma_I}. $$
The point of view used in this answer is due to D. Krupka (see e.g. Krupka - Introduction to Global Variational Geometry). There are other similar approaches using the infinite jet prolongation of a fibered manifold (see e.g. Anderon - The Variational Bicomplex), in which the Euler-Lagrange form is obtained by applying a suitable splitting operator to the abstract variation of the Lagrangian. Moving on to the Lepage extension essentially performs this splitting implicitly.