My suggestion is to think of the habit as a seed that you grow.
Intentionally practice sitting down at your desk and putting on the glasses. Aim to intentionally practice doing it once a day. Start now: sit down at your desk, put on your glasses, and then go back to whatever you were doing. Then set an alarm to practice the same thing once tomorrow.
After you've successfully practiced intentionally sitting down at your desk and consciously putting on your glasses once per day, several days in a row, then start doing the same thing twice a day (again by setting an alarm to practice). After several days of that, do it three times per day.
My guess is that, after doing this, you'll start doing it automatically whenever you're at your desk.
The one key is consciously practicing the habit on a schedule instead of trying to remember when you happen to sit at the desk randomly. The other key is starting small and building up.
Good luck!