5. Given $\sin \alpha+2 \cos \beta=2$. Then
$$
y=\sin \left(\alpha+\frac{\pi}{4}\right)+2 \sin \left(\beta+\frac{\pi}{4}\right)
$$

the range of $y$ is . $\qquad$
5. $\left[\sqrt{2}-\frac{\sqrt{10}}{2}, \sqrt{2}+\frac{\sqrt{10}}{2}\right]$.

From the problem, we have
$$
\begin{aligned}
y & =\frac{\sqrt{2}}{2}(\sin \alpha+\cos \alpha)+\sqrt{2}(\sin \beta+\cos \beta) \\
& =\sqrt{2}+\frac{\sqrt{2}}{2}(\cos \alpha+2 \sin \beta) .
\end{aligned}
$$

Let $\cos \alpha+2 \sin \beta=t$. Then
$$
\begin{array}{l}
t^{2}+4=t^{2}+(\sin \alpha+2 \cos \beta)^{2} \\
=5+4 \sin (\alpha+\beta) \leqslant 9 \\
\Rightarrow t^{2} \leqslant 5 \\
\Rightarrow y \in\left[\sqrt{2}-\frac{\sqrt{10}}{2}, \sqrt{2}+\frac{\sqrt{10}}{2}\right] .
\end{array}
$$