Melatonin, Magnesium, and Ambien merely don’t Review. How does prescription sleep medication from LifeMD differ from melatonin, magnesium or Ambien? Melatonin and magnesium might have unpleasant side effects like problems and diarrhea. Taste great it’s 5 gummies per serving but I actually loved that felt like I had been truly using a snack.