For years, I had migraines. Sometimes they would last two weeks straight--day and night. Then a friend mentioned that certain foods prompt headaches. In particular, this friend mentioned that chocolate is a very common cause of headaches.
During that period, I would get the munchies at work everyday around mid afternoon and head for the candy machine and buy a chocolate bar. This just fed the migraine on a daily basis.
By all means, get the MRI. But check out your diet also. Some web article I found once said that there are two groups of foods that cause headaches. The two food groupings are based on the presence of one or another chemical that causes the headache.