Alternatively, and I'm not an expert but have hypoglycemia so managing diet is crucial, maybe experiment with either eating later, or having a small non carb snack before sleeping ... as the docs aren't helping try some data gathering yourself ... good luck with it.
I spent years with, sometimes, 2 day headaches. Now, well apart from stress ones, I only get headaches when I've overdone carbs, tho often cumulatively after a cupla days of eating 'unwisely'