Suppose we're given two action integrals:
$$ S_1 = \int_{t_0}^{t_1} L_1(t,y,\dot{y}) dt \\ S_2 = \int_{t_1}^{t_2} L_2(t,y,\dot{y}) dt$$
The minimization of action integral $S = S_1 + S_2$ with respect to $y(t)\in C^2$ entails
$$ \dfrac{d}{d t}\dfrac{\partial L_1}{\partial \dot{y}} - \dfrac{\partial L_1}{\partial y} = 0 \; \forall \;t_0\leq t\leq t_1\\ \dfrac{d}{d t}\dfrac{\partial L_2}{\partial \dot{y}} - \dfrac{\partial L_2}{\partial y} = 0 \; \forall \;t_1\leq t\leq t_2$$
Now suppose I want to find $y(t)$ given boundary conditions $y(t_0) = y_0$ and $y(t_2) = y_2$. Here $y(t_1)$ is unconstrained. This can be done by solving each Euler Lagrange equation. However, I am stuck at enforcing continuity of $y(t)$ and $\dot{y}(t)$ at $t=t_1$. How should one incorporate them?
TL;DR: Assuming that the variation of $y$ at $t=t_1$ is unconstrained, the 2 pertinent conditions at $t=t_1$ are $$\left.\frac{\partial L_1}{\partial \dot{y}}\right|_{t=t_1}~=~\left.\frac{\partial L_2}{\partial \dot{y}}\right|_{t=t_1}\qquad\text{and}\qquad \lim_{t\to t_1^-}y(t)~=~\lim_{t\to t_1^+}y(t).\tag{A}$$
Comments:
The first condition follows by adjusting the standard proof of the Euler-Lagrange (EL) equation to OP's situation.
Physically, the conditions (A) mean that momentum and position are continuous functions of time $t$, respectively. Note that the continuity of velocity $\dot{y}$ might not be achievable at $t=t_1$.
The 2 conditions (A) together with the 2 boundary conditions $y(t_0) = y_0$ and $y(t_2) = y_2$ are in total 4 conditions.
Since each of the 2 interval solutions come with 2 integration constants, a total of 4 conditions are just the right number in order to have a unique solution.