I get what you’re saying, but I think it’s fair to view it as equivalent to drinking a protein shake after a workout. You used the resources in a productive and healthy way, now you need to replenish them.
sure if you're just taking it as a dietary supplement, but clearly OP is using it as a form of sleeping pill. which is also fine but just seems like mental gymnastics.
Stress pays my mortgage unfortunately, and I don’t have a way to make money otherwise because all the jobs in my profession of over a decade are stressful.
The magnesium deficiency would probably still exist if you removed the stressful job. Unfortunately switching jobs or careers is not an option in this current job market.