Stress can make it hard to focus on things, and it can lead to
memory problems, too, especially if you are sleep deprived. Hormones problems, like during perimenopause, can bring these symptoms on, too.
Have you seen your doctor lately?
Are you on medication for the migraines? (If yes, it could be that the medication or medications are having side effects.