Example 2 Find the maximum value of the function $y=\sqrt{2} \sin \alpha+\sqrt{5} \sin \beta+\sqrt{10} \sin \gamma$, where $\alpha+\beta+$ $\gamma=\pi$, and find the angles $\alpha, \beta, \gamma$ at which the maximum value is achieved.
In Theorem 2, take $x=\sqrt{2}, y=\sqrt{5}, z=\sqrt{10}$, substitute into equation ( $※$ ), and simplify to get
$$w^{3}+4 w^{2}-5=0$$

This equation has a positive root $w=1$. Substituting $x=\sqrt{2}, y=\sqrt{5}, z=\sqrt{10}, w=1$ into inequality $\left(10^{\prime}\right)$, we get
$$\sqrt{2} \sin \alpha+\sqrt{5} \sin \beta+\sqrt{10} \sin \gamma \leqslant 6$$

Therefore, the function has a maximum value of 6, at which $\cos \alpha=\frac{1}{\sqrt{2}}, \cos \beta=\frac{1}{\sqrt{5}}, \cos \gamma=\frac{1}{\sqrt{10}}$, i.e., $\alpha=$
$$\frac{\pi}{4}, \beta=\arccos \frac{\sqrt{5}}{5}, \gamma=\arccos \frac{\sqrt{10}}{10}$$