In one study of 6,000 participants, 10% of those who took omeprazole for 3 years experienced memory loss. Another study found that 33% of patients taking the drug for more than 4.5 years reported cognitive problems. This may be due to decreased absorption of vitamin B12, which is essential for neuronal function.