Magnesium supplements are perhaps one of the most popular melatonin alternatives; for good reason. Magnesium is an essential trace mineral found in various amounts in many foods. As a dietary mineral, its key role is in enzyme reactions.