Derivation of energy flow in the electromagnetic wave in free space:
The Poynting vector is given by
$\overrightarrow{S}=\overrightarrow{E} \times \overrightarrow{H} \qquad(1)$
$\overrightarrow{S}=\frac{1}{\mu_{0}} ( \overrightarrow{E} \times \overrightarrow{B} ) \qquad(2) \qquad (\because \overrightarrow{B}= \mu_{0} \overrightarrow{H})$
We know that the characteristic impedance equation i.e.
$\overrightarrow{B}=\frac{1}{\mu_{0}c}(\hat{n} \times \overrightarrow{E}) \qquad(3)$
Now substitute the value of $\overrightarrow{B}$ in equation$(2)$
$\overrightarrow{S}=\frac{1}{\mu_{0}c} [\overrightarrow{E} \times (\hat{n} \times \overrightarrow{E})]$
$\overrightarrow{S}=\frac{1}{\mu_{0}c} [(\overrightarrow{E}.\overrightarrow{E}) \hat{n} (\overrightarrow{E}.\hat{n}) \overrightarrow{E})] \qquad(4)$
As $\overrightarrow{E}$ is perpendicular to $\hat{n}$ so $\overrightarrow{E} . \hat{n}=0$ then we get for above equation$(4)$
$\overrightarrow{S}=\frac{1}{\mu_{0}c} E^{2} \hat{n}$
From the above equation, we can conclude $\overrightarrow{S}$ has the same direction as $\hat{n}$ which is the direction of wave propagation.
Energy flow in an electromagnetic wave takes place in the direction of the propagation of the wave.
Here $\mu_{0} c=Z_{0}$ (The Characteristic impedance of free space)
$\overrightarrow{S}=\frac{1}{Z_{0}} E^{2} \hat{n}$

This is the equation of energy flow in the electromagnetic wave in free space.
The average energy flow over one period of the electromagnetic wave in free space:
Now the average energy flow of the above equation
$ \left< \overrightarrow{S} \right> =\frac{1}{Z_{0}} \left< E^{2} \right> \hat{n} \qquad(5)$
We know the electric field vector wave equation i.e. $\overrightarrow{E}=E_{0} e^{i(\overrightarrow{k}. \overrightarrow{r} \omega t)} $
So the value of $\left< E^{2} \right>$ from above equation:
$\left< E^{2} \right>= \left< Re[E_{0} e^{i(\overrightarrow{k}. \overrightarrow{r} \omega t)}]^{2} \right>$
$\left< E^{2} \right>= \left< E_{0}^{2}\: cos^{2}(\overrightarrow{k}. \overrightarrow{r} \omega t) \right>$
For one period or cycle of electromagnetic wave the value of $cos^{2}(\overrightarrow{k}. \overrightarrow{r} \omega t)=\frac{1}{2}$ then we get
$\left< E^{2} \right>= \frac{E_{0}^{2}}{2}$
$\left< E^{2} \right>= (\frac{E_{0}}{2})^{2}$
$\left< E^{2} \right>= E_{rms}^{2} \qquad \left (\because E_{rms} = \frac{E_{0}}{2}\right )$
Now substitute the value of $ \left< E^{2} \right>$ in equation $(5)$ then we get
$ \left< \overrightarrow{S} \right> =\frac{E_{rms}^{2}}{Z_{0}} \hat{n} $

This average energy flow equation over one period of the electromagnetic wave in free space.