Answer
This trend can be explained due to the increasing size of the metal cation.
Work Step by Step
The size of metal cations are in the order $Ba \gt Sr \gt Ca \gt Mg$. When the size of the metal cation increases, its distance from the oxygen anion also increases. This leads to a decrease in potential energy as the distance increases, and hence the lattice energy also decreases.