Magnesium deficiency in healthy people is rare but it can be caused by: a poor diet (especially in elderly people or those who don't have enough to eat) type 2 diabetes. digestive problems such as Crohn's disease.