Many people take magnesium along with calcium, in the same
supplements, at bedtime, although some suggest that
magnesium is best absorbed in the day time. If the calcium supplement contains magnesium, taking both at the same time is appropriate.
Many vitamins are best ingested with food, so taking them at meal time is advised. It's easy to remember to take vitamins with meals, since you are eating and drinking at that time, anyway.