This might not apply to you but my recent experience of getting my memory back might be interesting, if nothing else.
I'm nearing my 40s and have been seeing a steady decline in my ability to learn. My short term memory was the real problem I couldn't keep enough in there to put ideas together. I couldn't focus on or retain new information. Some was explained by stress. I had a lot going on with work, a new family with a young baby and a dying parent but it was more than that.
At the same time my wife was having trouble sleeping. Since the birth of our first child she was not able to sleep, like she used to. Now every noise would wake her up, especially her snoring husband. My snoring was always bad but she used to be able to cope with it.
So I started talking to the doctor about my snoring. He suggested I try a mandibular repositioning device. It didn't fix my snoring but something happened to my memory. Approximately a month of using the device and my memory began to improve.
The mandibular repositioning device hurt and didn't help my wife sleep so I pressed on. The next step was to work with a sleep clinic. They got me tested for sleep apnea. It turned out I was at the upper end of mild on the apnea index.
The next step was a CPAP trial. They sent out a machine and I was to try it for a month to see if it improved my sleep and snoring. It was not fun. The thing was terrible to sleep with. It hurt, I kept waking up, it filled my stomach with gas and I felt worse than I did with the mandibular repositioning device.
I kept going because it did stop my snoring, so I had hope. Every second day I'd call the clinic and they would mess with the settings on the machine. Almost a month in something switched. I could sleep through the night.
Then my memory and focus really returned. I can now learn at the pace I was used to as a student in my 20s. I could structure my thinking in a way I wasn't used to. My abilities at work improved beyond what I thought possible. Oh, and my wife can sleep next to me. I don't snore, move in my sleep or get up to use the loo anymore.
After this I've been shouting about it everywhere I can. Sorry, if my CPAP evangelism is a bit much.
Interestingly as I reflected on the change I remembered something I'd read in "Coders at work", Douglas Crockford reported something similar with his apnea.
Here is the quote:
Seibel: Do you think that programming is at all biased toward being young?
Crockford: I used to think so. A few years ago I had sleep apnea, but I didn’t know it. I thought I was just getting tired and old, and I got to the point where it was so difficult to concentrate that I couldn’t program anymore because I just couldn’t keep enough stuff in my head. A lot of programming is you keep stuff in your head until you can get it written down and structured properly. And I just couldn’t do it.
I had lost that ability and I thought it was just because I was getting older. Fortunately, I got better and it came back and so I’m programming again. I’m doing it well and maybe a little bit better now because I’ve learned how not to depend so much on my memory. I’m better at documenting my code now than I used to be because I’m less confident that I’ll remember next week why I did this. In fact, sometimes I’ll be going through my stuff and I’m amazed at stuff that I had written: I don’t remember having done it and it’s either really either awful or brilliant. I had no idea I was capable of that.
https://wm-help.net/lib/b/book/2520193410/5