How much magnesium should you use?
The Dietary Reference Intakes for Elements is a good source for understanding how much you need and how much magnesium you can safely consume every day for the rest of your life:
It is important to note that these levels regard all sources of magnesium, including food sources, supplements, and water.
We recommend that you experiment within the range between how much you need and how much you can safely take every day for the rest of your life. This will ensure self-experiments with magnesium that are likely very safe and hopefully enable you to get the most out of it to help you feel and perform at your best.
What time of day should you take magnesium?
There is no data on what the optimal time of day for use of magnesium is. There is no evidence that magnesium impairs sleep if taken before bed-time.