Yoga exercises could stimulate the passage of (green) food and/or (originally green) bile through your bowel, and then either the food or bile would color the stool green. If stools are loose and contain undigested food, you are losing nutrients this way.
Excessive use of magnesium supplements can be toxic. The upper limit -- the highest dose a person can take -- of magnesium supplements is: 65 mg/day for children ages 1-3. 110 mg/day for children ages 4-8. 350 mg/day for adults and children ages 9 and up.
According to the Institute of Medicine, men require 400 to 420 mg of magnesium daily while women require 310 to 320 mg. Pregnant or lactating women require slightly greater amounts, approximately 310 to 400 mg, per day. Children require 80 to 240 mg daily, while adolescents require 360 to 410 mg of magnesium. Individuals using certain medications or who have chronic absorption problems might require higher amounts of magnesium daily.