It's best to take everything by 8:00 at night. By about 8:00 at night, your body starts shutting down a lot of digestive processes. Magnesium is easily absorbed so that's not such much an issue, but since you also want to give it time to work, the 8:00 deadline is still probably best. :)