Usually not long. Digital eye strain is temporary fatigue, not damage, so the tired, dry, achy feeling typically fades within a few minutes to a few hours once you rest your eyes, especially if you step away, blink, and look at something far away.
If your eyes still feel strained the next day, or symptoms keep coming back despite breaks and better screen habits, that points to something fixable, an uncorrected prescription, dry eye, or a poor setup, and it's worth an eye exam. Strain that lingers or keeps worsening isn't normal.