Theoretically, you're doing more HARM, than good.
Springs do not wear out loaded, or unloaded, but with repeated loading and unloading, or cycling. A spring in constant compression does not soften. A spring in constant "relaxation" does not soften. But repreated compression, and release, fatigues the steel, and softens the spring.
You're better off loading the mag, and leaving it loaded!
PS An unloaded gun, in the middle of the night, is an awkward rock...