Here : Proof that a stopped continuous-time martingale is a martingale.
Optional sampling theorem : If $X = (X_t,\mathcal{F}_t)$ is a supermartingale and $T$ is an arbitrary stopping time, then the stopped process $X^T=(X_{T\wedge t},\mathcal{F}_t)$ is also a supermartingale.
Proof : Here we give a sketch of the proof. Assume $X$ is a supermartingale. First, for a fixed $n\ge 1$, let
$$
D_n = \left\{\frac{k}{2^n}, k= 0,1,2,\ldots\right\}\subset D_{n+1}\subset \cdots
$$
be the set of non-negative dyadic rationals of order no greater than $n$. It follows that
$$
X = (X_t,\mathcal{F}_t; t\in D_n)
$$
is a super martingale (discrete time).
Second, we construct a stopping time $T_n$ such that $T_n\ge T$ and $T_n$ only take values in $D_n$. Indeed, let
$$
T_n(\omega) = \inf\left\{t\in D_n; t\ge T(\omega)\right\}.
$$
Then $T_n\ge T_{n+1} \ge \cdots $ and $T_n$ is a stopping time. Fix $0\le s\le t$, we wish to show that
$$
\mathbb{E}\left[X_{t\wedge T}|\mathcal{F_s}\right]\le X_s
$$
almost surely. Similarly define
$$
t_n = \inf\left\{u\in D_n; u\ge t\right\} \ge t_{n+1}\ge\cdots
$$
and
$$
s_n = \inf\left\{u\in D_n; u\ge s\right\} \ge s_{n+1}\ge\cdots
$$
It follows from the discrete time optional sampling theorem that
$$
\mathbb{E}\left[X_{t_n\wedge T_n}|\mathcal{F}_{s_m}\right] \le X_{s_m \wedge T_n}
$$
for any integers $m\ge n$. Letting $m\to\infty$, we have $s_m \to s$ decreasing and $\mathcal{F}_{s_m}\to\mathcal{F}_s$. By Lévy's Downward theorem and the continuity of process $X$, we have
$$
\mathbb{E}\left[X_{t_n\wedge T_n}|\mathcal{F}_{s}\right] \le X_{s_m \wedge T_n}
$$
Observe that $(X_{t_n\wedge T_n},\mathcal{F}_{t_n\wedge T_n})$ is a backward martingale, whence it is uniformly integrable. Letting $n\to\infty$, we arrive at
$$
\mathbb{E}\left[X_{t\wedge T}|\mathcal{F}_{s}\right] \le X_{s\wedge T}.
$$
This completes the proof.