Depends on the cause
strain caused by the need for glasses
will not go away until your eyes are properly corrected.
The actual strain can last for minutes to hours after you stop straining your eyes. If you have a persistent discomfort no matter what you do, you should have an examination by your eye doctor.