I have never worked with magnesium nitrate (maybe as part of a micro mix?). Ammonium nitrate: they make it inconvenient and ask for a lot of information, record exactly how much you took and where you plan to use it, but it is available.
I get an especially good response on newly seeded areas from potassium nitrate @1#K/M followed by urea a week later @ 0.7# N/M, making 1# of each total. Since figuring that out several years ago I do not like not having some on hand at all times. I also believe there is no comparable substitute but would like to find one.