Sodium is more reactive than magnesium. Sodium has 2,8,1 electronic configuration which is ready to loose its one electron to attain the stability. So its more reactive. Magnesium has 2,8,2 configuration which will not loose its electron from the stable configuration. That is why sodium is more reactive than magnesium.