Several years ago, I had a problem with leg cramping. I couldn’t figure out what was going on. Of course I thought of the worst possible scenarios. I was telling a friend about it and she mentioned that a lack of magnesium could cause twitching and cramping. I went out and bought the powdered version of the magnesium with calcium that you mix with water. Within 2 days the twitching in my thumb and the cramps in my legs were gone. I read an article recently in a magazine about how many diseases and disorders can be helped with magnesium. Some of the symptoms of low magnesium is : Insomnia, High blood pressure, Muscle cramps, Osteoporosis, Hyperactivity and panic attacks. If you are experiencing any of these symptoms, talk to your doctor, it could be low magnesium. The best way to get magnesium in your diet is by eating green leafy vegetables. fish (especially halibut) spices such as paprika, basil, peppermint, parsley, and lemongrass contain high amount of magnesium, beans, nuts and fruits such as avocados, apricots, bananas and raisins and tomato paste. There are also some whole grains that contain magnesium. I have read the children can easily get deficient in magnesium and can get twitching from it. Here is a site that includes a list of foods with magnesium and how much is in it.