(CNN) Worried about your mental function during stressful times? You can reduce your risk for cognitive impairment by half if you closely follow the Mediterranean diet, known for its emphasis on vegetables, whole grains, fish, and olive oil, according to two new studies.

"People with the higher adherence to the Mediterranean diet had almost a 45% to 50% reduction in the risk of having an impaired cognitive function," said lead author Dr. Emily Chew, who directs the Division of Epidemiology and Clinical Applications (DECA) at the National Eye Institute in Bethesda, Maryland.

"The evidence continues to mount that you are what you eat when it comes to brain health," said Dr. Richard Isaacson, who directs the Alzheimer's Prevention Clinic at NewYork-Presbyterian's Weill Cornell Medicine Center.

"Anyone can take control of their brain health today and lower their risk of cognitive impairment through simple dietary choices," added Isaacson, who was not involved in the study.

Closely following the diet was defined as eating fish twice a week, as well as regularly consuming fruits, vegetables, whole grains, nuts, legumes, and olive oil while reducing consumption of red meat and alcohol.

The risk for cognitive decline increased as the levels of adherence dropped, Chew said.

"There was a dose response to following the diet that was consistent in both studies," Chew said. "Those who had the highest adherence to the diet had better protection than those who are in the second tier, who had more cognitive protection than those in the last tier."

The Mediterranean diet didn't appear to slow cognitive decline in people with the ApoE gene, which dramatically raises the risk for Alzheimer's disease, Chew said.

But when the study looked at just the levels of fish consumption, eating fish twice a week did slow the decline in people with the gene, Chew said. At 10 years into the study, "we could actually see that there was a difference when fish consumption was high. That progression rate did not go down as fast," she said.

"In this study, while the Mediterranean diet overall decreased risk, the strongest factor to really move the needle was regular fish consumption," said Isaacson, who is also a trustee of the McKnight Brain Research Foundation.

"While this was a longer-term study, these results parallel findings from our clinical research in the Alzheimer's Prevention Clinic, where people who made dietary and other lifestyle changes showed cognitive improvements in 18 months," he said. "Future studies will help to clarify how long a person needs to make a dietary change before seeing an impact on cognitive outcomes."

A long history of diet's effect on eyes

The studies analyzed data from two major eye disease studies, the Age-Related Eye Disease Study (AREDS) and AREDS2, which followed the diets of some 8,000 people with and without macular degeneration over 10 years. Cognition was also tested at various intervals.

Why would researchers use an eye study to investigate the effect of diet on cognition?

"The retina is an extension of the brain," Chew said. "A third of your brain functions for vision and the retina lines the eyeball and travels back via an optic nerve all the way to the brain."

That's why it made sense that any antioxidants which might improve the retina might also improve the brain, she said.

"We thought, 'well, you know, we probably should look at oxidative stress and diet for cataracts and macular degeneration.' It turns out that it was an important study," Chew said.

Responsible for the bright colors of vegetables, lutein and zeaxanthin are found in all vegetables, but especially good sources of these antioxidants are green, leafy vegetables such as kale, parsley, spinach, broccoli and peas.

Once in the body, lutein and zeaxanthin travel to the retinas at the back of the eye. There they help filter harmful high-energy blue light wavelengths that can damage the cells of the eye.

The study found that high adherence to the Mediterranean diet helped in reducing the risk of macular degeneration through all stages.

"If you have early disease, it prevents you from going to the next stage; and if you have more intermediate stage, it prevents you from going to the late stage. It's actually very interesting," she said.

A later study element included giving study participants the antioxidant vitamins C, E, beta carotene and zinc.

"There was also a reduction and progression to late-stage disease macular degeneration. So this was one of the successful stories about oxidative stress vitamins," said Chew.

While the AREDS study did not find a positive effect of antioxidants on cataracts, studies since then have shown a moderately reduced risk of age-related cataracts in older women.

How to start the Mediterranean diet

Want to jump on the Mediterranean diet bandwagon and protect your brain as well as your eyes?

Experts say the easiest way to start is to replace one thing at a time. For example, replace refined grains with whole grains by choosing whole wheat bread and pasta and swapping white rice with brown or wild rice.

Cook one meal each week based on beans, whole grains and vegetables, using herbs and spices to add punch. No meat allowed. When one night a week is a breeze, add two, and build your non-meat meals from there.

On the Mediterranean diet, cheese and yogurt show up daily to weekly, in moderate portions; chicken and eggs are okay on occasion, but the use of other meats and sweets is very limited.

When you eat meat, have small amounts. For a main course, that means no more than 3 ounces of chicken or lean meat. Better yet: Use small pieces of chicken or slices of lean meat to flavor a veggie-based meal, such as a stir fry.

Fish is king in the Mediterranean diet, and is eaten at least twice a week.

"Fatty fish like wild salmon, sardines, albacore tuna, lake trout and mackerel are loaded with brain healthy Omega-3 fatty acids which nourish the brain cells," Isaacson said.

Focus on fruits, vegetables, grains, nuts and seeds. Add whole grains and fruit to every meal, but use nuts and seeds as a garnish or small snack due to their high calorie and fat content.

Get CNN Health's weekly newsletter Sign up here to get The Results Are In with Dr. Sanjay Gupta every Tuesday from the CNN Health team.

Eat a lot of veggies and use all kinds and colors to get the broadest range of nutrients, phytochemicals and fiber. Cook, roast or garnish them with herbs and a bit of extra virgin olive oil.

If fish is the king, olive oil is the queen in the Mediterranean diet -- stay away from coconut and palm oil, experts say. Even though they are plant-based, those oils are high in saturated fats that will raise bad cholesterol.

All that and a healthier brain and eyes too? What's to lose?