There doesn’t appear to be a single accepted explanation as such.
As you well know, metallic bonding is present in all these elements, so they are sometimes likened to regular arrangements of ions in a sea of delocalised electrons.
If we work with this model, the group 2 elements will be forming +2 ions and down the group, the atoms will be getting larger and so the charge densities of the ions will be decreasing, making the electrostatic attraction between the metal ions and the delocalised electrons weaker, hence it would be expected that you would observe a decrease in the melting points down the group.
The suggested theory is that the structures of the metals contribute somewhat to their melting points and this somehow causes the melting point of magnesium to be unexpectedly low. One thing that is observed down group 2 is that the “unit cells” (i.e in simple terms, a repeating section of the structure showing the arrangement of the atoms within a unit space) differ.
Be and Mg are hexagonal-close packed (hcp)
Ca and Sr are face-centred cubic (fcc)
Ba and Ra are body-centred cubic (bcc)
Note that the packing efficiencies of hcp and fcc unit cells are exactly the same at circa 74%,
so it may not be due to how closely packed the atoms are within the structures if the structures are at all a contributing factor.