Night Migraines helped only by caffeine 😫

i guess i have hypnic headaches, wake me up around 2 everynight. i finally learned that caffeine cures them. but the amount of caffeine i need keeps increasing, so i am drinking so much i have wake up for the bathroom several times, and now it seems it isnt enough anymore to actually prevent the headache. now im addicted to a mass amount of caffeine. any ideas what to try now?

i wanted to add that sumatripan helps a lot, but insurance only allows me 9 per month.