Nearsightedness is prevalent in demographic groups that look at screens for most of their time, such as office workers or students. (Saw et al., 2002) Glasses correct the defocusing of the lens in the eye. The ciliary muscle then doesn't need to try hard to change the shape of the lens, and therefore is less strained.
It seems to me as if wearing glasses and looking at a close object for extended periods of time will only worsen the condition of the lens: the ciliary muscle needs to actively correct the lens to focus light coming from a short distance. Without glasses the eye is able to focus on the near object anyway without a problem.
Conversely, it sounds logical to assume that working on a computer without glasses will not change anything, but instead might "train" the ciliary muscle to shape the lens properly again over time.
Is this correct, i.e. is there research which deals with the question of whether one becomes more nearsighted when wearing correcting glasses and focusing on a close object? Does wearing glasses while on the computer accelerate the development of myopia or not?