I wish I could tell you some real answers. I have the same problem. It goes on for about 3 or 4 days and then I am so exhausted that I finally sleep. Some sources do say that the answer to sleep deprivationis sleep deprivation. But stay in bed with the lights out and try to breath properly.
Have your self tested for sleep apnea in case that's a problem too. And it's always good to see a professional to root out any underlying issues. Mine is PTSD that I hid for many years and I still work on it..
In sleep, our mind tries to resolve the issues we have faced and move forward refreshed and ready for another day. When you try to resolve those issues in "foreground" mode, that is while you are awake, your brain will not draw on all its resources as it would if your body were shut down mode. (There are technical terms for all this but big words have never impressed me.) Tell yourself that your brain will figure it out whether you sleep or not, so why not sleep?
If you use alcohol to sleep, you are only compounding the problem with lowered and elevated sugar levels, among other chemicals that go out of balance. You wake upin the early morning with no real restorative sleep. And, let me guess,you walk around all day exhausted, and eventually depressed. I have actually got in my car at about mid-morning, let back the seat, and believeit or not, fell asleep. Not good for keeping a job.
I have been through most of the drug spectrum and I can say not many of them are good for you long term. Some are actually dangerous if you do not follow instructions specifically. But some have worked for friends I know. If it goes on for longer than two weeks, see a good professional counselor who can guide you to a solution. Sofar for me, talk therapy, has been the only that works -- for a while anyway.
Some tips: start to prepare for sleep hours ahead of your bedtime, make that bedtime consistent (if you can -- I cannot due to my on call responsibilities), don't starve or overeat at dinner, have a light snack (no carbs or sugars, just protein) anhour before bedtime, don't read before bed if you have an active mind, and if you just cannot sleep, stay in bed with the lights off and again, try to breath. Oxygen is better than any drug.
Good luck to you..