Step-by-step explanation:
According to electron sea theory magnesium shares two valence electrons in electron sea while sodium shares one suggesting that magnesium has stronger metallic bond than sodium so breaking metallic bond in magnesium will require more energy as compared to breaking metallic bond in sodium and that's why melting point of magnesium is greater than sodium. Similarly aluminium has greater melting point than both sodium and magnesium because it shares three electron in electron sea having much stronger metallic bond with other aluminum atom.