This is to expand the result of the OP using the the comment of Sangchul Lee.
We consider
$$\begin{align}\lim_{n\rightarrow\infty}\int_E\cos^{2m}(n x+ \alpha_n)\,dx\tag{0}\label{zero}\end{align}$$
where $m\in\mathbb{N}$ and $\alpha_n$ is an arbitrary sequence in $\mathbb{R}$.
From $\cos\theta=2^{-1}(e^{i\theta}+e^{-i\theta})$, we obtain that
$$\begin{align}
\cos^{2m}(\theta)&=2^{-2m}\sum^{2m}_{k=0}\binom{2m}{k}e^{i\theta (2m-2k)}\\
&=2^{-2m}\binom{2m}{m}+2^{-2m}\Big(\sum^{m-1}_{k=0}\binom{2m}{k}e^{i\theta (2m-2k)}+\sum^{2m}_{k=m+1}\binom{2m}{k}e^{i\theta (2m-2k)}\Big)\\
&=2^{-2m}\binom{2m}{m}+2^{-2m+1}\sum^m_{k=1}\binom{2m}{m-k}\cos(2k\theta)
\end{align}$$
Hence
$$
\int_E\cos^{2m}(nx+\alpha_n)\,dx=2^{-2m}\binom{2m}{m}\lambda(E)+2^{-2m+1}\sum^m_{k=1}\binom{2m}{m-k}\int_E\cos(2k(nx+\alpha_n))\,dx$$
By Riemann-Lebesgue's lemma,
$$\Big|\int_E\cos(2knx+2k\alpha_n)\,dx\Big|\leq\Big|\int_E\cos(2knx)\,dx\Big|+\Big|\int_E\sin(2knx)\,dx\Big|\xrightarrow{n\rightarrow\infty}0$$
Putting things together, we obtain the more general formula
$$\lim_n\int_E\cos^{2m}(nx+\alpha_n)\,dx=2^{-2m}\binom{2m}{m}\lambda(E)$$
The OP for example, corresponds to $m=1$.
One last interesting thing. The limit in \eqref{zero} can also be approached by Fejer's formula which states that if $\phi\in L_1(\mathbb{R})$ and $f$ is a bounded $T$-periodic measurable function, then
$$\lim_n\int \phi(x) f(nx+\alpha_n)\,dx = \Big(\frac{1}{T}\int^T_0f\Big)\Big(\int \phi\Big)$$
for any sequence $\mathbb{\alpha_n}$. Letting $\phi(x)=\mathbb{1}_E$, and $f(x)=\cos^{2p}(x)$, we have that $f$ is $\pi$--periodic and so
$$\lim_n\int_E\cos^{2m}(nx+\alpha_n)\,dx =\lambda(E)\frac{1}{\pi}\int^{\pi}_0\cos^{2m}(x)\,dx$$
The formula we obtained before gives us the estimate $\frac{1}{\pi}\int^{\pi}_0\cos^{2m}(x)\,dx=2^{-2m+1}\binom{2m}{m}$.