We treat the symptom and wonder why we aren't getting any better. Beyond that, move around from time to time. Every thirty minutes, at least. When you sit still, the blood has a tendency to pool in your extremities. The oxygen flow to your brain, which depends on movement, is not as ample as it should be.
Breathing properly is very important.
Slouching over a keyboard or leaning back in the chair impedes your respiratory system. And it's wise to avoid putting anything into your bloodstream that interferes with the red blood cells' oxygen-bearing capabilities. I'm not a fan of soft drinks, with or without caffeine. Nor am I big on coffee and tea. There's nothing like plain old water.