This question has come up occasionally at various armorer's classes I've attended.
The answer has always been ... don't do it. Replace the spring if it's exhibiting signs of having become too weakened to provide for proper functioning.
There's always some person every once in a while that won't accept the experience of the manufacturer and their recommendation when a question is asked, and this subject is no different.
I remember one time when an instructor finally told someone, rather than continue to waste class time by 'debating' with a student, that stretching the magazine spring would most likely damage the spring, and probably reduce the remaining useful service life of the spring to less than an hour ... if that. Don't stretch springs. Replace them. Or use a different magazine until you can replace them.
I had a chance to see someone do this at a range in recent months. A 1911 magazine was exhibiting some occasional last-round feeding problems. As it turned out, the user had ignored the weapon's increasing failure to lock the slide back on an empty magazine, and was only starting to pay attention when the last feeding failures were starting to occur.Someone removed the magazine spring and gave it a 'healthy' stretch, and then replaced it in the magazine. To some people's surprise, the magazine quickly began to exhibit even more feeding failures, and not just with the last round. I strongly recommended the magazine be removed from service until a new magazine spring could be obtained and installed.
This why I generally to keep extra magazine & recoil springs on hand for my various pistols, as well as back up magazines.
Just my thoughts ...