hey zonker - what you are describing in your opening post sounds mildly frustrating!
I don't know if any of what I'm writing applies to you or if it is things you have already considered but some food for thought -
1. Can I ask when was the last time you took a break from the supplements you are taking?
Back when I took supplements (now I just take vitamin D every so often), I liked to take a break from everything for 2-3 weeks, just to see if any weird symptoms I was having were somehow coming from the supplements or interactions between them?
At the level of magnesium you are taking I would have diarrhea!

and some weird head pains. I learned that with supplements, sometimes less is more?
Seems like this guy (note - he seems a bit woo...and like he would rather pop vitamins and minerals than eat food)-
https://blog.bulletproof.com/hack-your- ... an-rhythm/ - also took potassium and magnesium at night and switched to taking them in the morning and his rationale was:
"The problem with potassium and magnesium is that they can drop your blood pressure, and you want your blood pressure a little higher when you wake up in the morning. Otherwise, your body will raise cortisol and adrenaline to make it high enough."
So is it possible your supplements are somehow lowering your blood pressure a lot, and your body is raising stress hormones to compensate?
I saw you said you have some medical conditions you have that necessitate your supplements though, so of course talk to your doctor, nurse, physician's assistant,etc.
But I've definitely found a drug or supplement that was supposed to help one condition end up causing another annoying side effect that affected sleep.
2. The book Chronotherapy by Dr. Michael Terman was an interesting one that my offer you some ideas on getting deeper sleep. He runs the sleep center at Columbia University and talks about the zeitgeber, or time giver. It's something to let our bodies know it's time to be awake versus time to be asleep. So an exogeneous zeitgeber would be an alarm clock, or exercise/socialization/other activity, or the sun, or the temperature dropping lower; and then an example of an endogenous zeitgeber would be the slow increasing production of melatonin by the pineal gland after the sun goes down, and other messages from the SCN, the Suprachiasmatic Nucleus of the hypothalamus, which controls much (if not all?) of the body's circadian rhythms.
Dr. Terman works with people who have to travel a lot and deal with jet lag from constantly changing time zones, and he says that as the body's levels of melatonin production are actually quite small, unlike what you buy over the counter, most people do best with much much smaller amounts of melatonin. I think he said the body on its own produces only 300 mcg (0.3 mg) of melatonin ( I could have that number wrong) and he recommends taking 0.1 mg (not micrograms!) 3 hours before bed, then 0.1 mg 2 hours bed, and then 0.1 mg 1 hour before bed, to mimic the body's natural production of melatonin. I tried it once or twice and it worked at giving me deep sleep for 2 nights? but then I got annoyed at having to take it 3 times a night and eventually it wore off in effectiveness, probably because I had UARS/OSA back then, which was preventing me from achieving deep sleep and staying asleep.
And his other thing is maximizing people's circadian rhythms by having them expose themselves to bright light of very high flux for 10-15 minutes a day when they wake up with a bright light monitor. You can buy a bright light monitor on amazon. He writes in the book that some of his patient say sitting with the bright light is more effective at waking them up than a cup of coffee, especially if they are in area that doesn't get as much bright light in winter, but he cautions that bright light monitors aren't for everyone, as they can worsen seasonal affective disorder and bipolar disorder if the light setting/timing isn't right, or if you have a circadian rhythm disorder where your day/night rhythms are different than everyone else.
It's been 8 years since I read the book, and I was under a sleep apnea fog, so who knows if I am explaining or remembering things right. But I just wanted to say that I have the same issue with melatonin as you - it never helped me stay asleep, only get drowsy before bed, and maybe the 0.1 mg x 3 melatonin dosage schedule before bed would be more beneficial in helping you stay asleep? (I sort of doubt it? but it's an interesting experiment nonetheless).
So anyway, his ideas on their own didn't work because I needed xpap, but the idea of zeitgeber stayed with me and I try to incorporate some of the very basic ideas- eat around the same times each day, get some bright light from the sun in the morning/afternoon if I can, use f.lux program on my computer at night to increase natural melatonin production, etc.
Do you live somewhere that gets ample sun in winter?
Take care, and thanks for all the joy from the gifs you have bestowed upon us!
sometimes in order to succeed it just takes one more try. and a lot of frustration along the way.