As someone who has never been a regular coffee consumer, I really didn't want to end up with the dual dependence of melatonin at night and then caffeine in the morning.
This thread is stimulating me to want to get my magnesium checked, but barring that I've found the most effective sleep interventions are the basic ones: get some exercise earlier in the day, and don't do screens for the last few hours before bed.