This depends on the magnitude of the stress in the spring.
It's unlikely anyone designs recoil springs for this duty, so it's conservative to store the gun with the action closed.
The main phenomenon to worry about in this situation is called "stress corrosion cracking". If the stress level is sufficiently low, it's nothing to worry about. But that means the part has to be over designed, so a less conservative design stress is used. Even if the sustained stress is sufficiently high and the spring does not corrode, there will not be a problem. This is also what causes torsion style garage door springs to fail, so keeping them oiled to prevent rust will make them last a long time.
The other phenomenon is creep under sustained load, and that is also a function of the sustained stress level and the material used for the spring.