Other conditions, including untreated sleep apnea, can also affect your memory, Fotuhi says. Mental processes such as attention, stress, pain, lack of sleep, and low levels of depression and anxiety ...