If your child can swallow capsules, I would suggest first giving a Whole-Food-Based Multivitamin (such as GSG GardenVites). Then if additional magnesium is needed, give capsules in the forms of Magnesium Glycinate or Magnesium Malate, which are the most bioavailable.
Epsom Salt: (magnesium sulfate) baths are great for simultaneous magnesium and sulphate absorption via the skin. Tip: I find that I need to rinse off afterwards in the shower with clean water so I don’t feel itchy.
Magnesium Oil: I spray Magnesium Oil on the soles of James’ feet at bedtime. (I find the oil makes us itch if applied to any other place on our bodies). My favorite brand is Essence of Life, which you can order a sample bottle for only $7 which will last you for quite some time. (you may want to pour it into a spray bottle once you receive it.)