To help keep your eyes in top shape, there's a large number of exercises you can do while working on electronic screens. I grabbed these ideas from some quick research
Roll your eyes.
This will help both by removing the strain of looking at the screen and by giving the muscles controlling your eye a slight workout.
Close your eyes. This break will allow your eyes to reset, reducing the load of a long day of looking at a screen.
Focus your eyes. You can focus on your nose, then focus on something far away, and repeat; this will help reduce the impact of looking at a screen a set distance away for a long time.
In addition, there are a number of strategies you can follow which, while not eye exercises, will make a day of looking at a screen far easier on your eyes. (same sources)
Take breaks. Whether taking a break to do one of the above exercises, or just to walk around, a break gives your eyes a chance to relax. Try to break at least for a minute or two once an hour.
Position monitor correctly. Your monitor should be between 1.5-2.5 feet from your eyes, and 1/2-1 foot lower than the plane of your eyesight. This positioning will help with refraction and will make it easier on your eyes to view the screen.
Enlarge text. Moving to a higher text size on editors or a higher zoom level on browsers will reduce the strain on your eyes.
Fix lighting. Make sure that your computer screen is set to a brightness level that feels comfortable on your eyes, and try to position external light sources so that they don't interfere with your view of the screen. Lighting can have a big impact on how hard your eyes are working to see the screen.
The best strategy here is to limit screen time, but with many jobs, that's not an option. When viewing a screen for many hours a day is necessary, these exercises and habits will help to reduce the impact on your eyes.