Most adults don't, if they eat a varied diet with wholegrains, nuts, seeds, beans and green vegetables. The Department of Health and Social Care says you should be able to get all the magnesium you need from food. A supplement can make sense if your diet is limited, you take medicines that lower magnesium, or a doctor finds a low level.
There is no single best form. Citrate and glycinate are good all-rounders. Oxide is best kept for constipation. If a form upsets your stomach, switch to glycinate or take smaller doses with food.
The best-supported uses are as a laxative for constipation, to help prevent migraine at fairly high doses, and to lower blood pressure by a small amount. It may modestly shorten the time it takes to fall asleep. It is not an energy supplement for people whose levels are normal.
It makes little difference for most purposes. If you are taking it for sleep, trials gave it in the evening. If it upsets your stomach, take it with a meal.
From food, almost never. From supplements, the usual problem is diarrhoea. Dangerous overdose is rare and mostly happens with very high doses, magnesium laxatives or antacids, or in people whose kidneys can't clear magnesium.
The amount of magnesium per serving in the nutrition table, the number of capsules in a serving, the form or forms used, and whether the product contains other active ingredients. Ignore large front-of-pack numbers until you have checked what they refer to.