@Mor - I don't know, I think magnesium is mostly found in green plants and there are plenty of people who don't get enough of those in their diets.
Although I would suggest instead of taking supplements they should just correct their diets to include more fresh fruits and vegetables as they are probably missing out on all kinds of other things that could help them sleep better.
Magnesium is also supposed to help with calcium absorption, so it's a generally good mineral to get in your diet.
I've actually heard of magnesium more often in relation to depression rather than magnesium and sleep, but perhaps the two are related.
They've done a couple of experiments where people with low magnesium, who were depressed, because less depressed when they took supplements.