Magnesium can affect several types of medications, which makes it essential to consult your doctor prior to use. It can interfere with the absorption and therefore effectiveness of certain heart medications such as digoxin and some antibiotics such as penicillamine. A potentially dangerous side effect can occur with anticoagulant medications.