This question is edited and migrated from mathstackexchange
The Euler–Lagrange equation is an equation satisfied by a function $q$, which is a stationary point of the functional
$S(\boldsymbol q) = \int_a^b L(t,q(t),\dot{q}(t))\, \mathrm{d}t$
Say we have an infinite action over infinite time - the action of a free particle for all time, for exampler. A critical point of the action functional means nothing here, but of course the Euler Lagrange equations still exist for all time. If we associate the Euler Lagrange equations to a Hamiltonian system, then the path should solve Hamiltons equations iff the Euler Lagrange equations are satisfied. Can we say that these still offer a solution as $t \rightarrow \infty$, even though asking about "a critical point of the action functional" no longer makes sense? Is there a way to make sense of it formally?
Strictly speaking, the functional (action) should be well-defined, meaning you should consider a space of functions (paths) for which it is finite, and this restriction should be sensible (e.g. a subspace of some Hilbert space). Without this, it the action is not well-defined, and so it is not clear what it would even mean to take functional derivatives of it. So in this strict sense, the action for a free massive particle over all time: $$S = \int_{-\infty}^{\infty} \frac{1}{2} m \dot{q}(t)^2 dt,$$ is not well defined if you allow e.g. paths with constant velocity, $\dot{q}$, and then you cannot get Euler-Lagrange equations from it either.
In practice however, you can consider such an action for the interval between any two finite times $t_1$ and $t_2$, for which everything is ok, and you can get Euler-Langrange equations. Since things are ok in any interval $(t_1,t_2)$, you have Euler-Lagrange equations for any time (arbitrarily large but finite). So in this sense, the Euler-Lagrange equations have meaning for any time interval, and then conceptually you can let this time interval tend to infinity.