That does sound horrible :(.

I don't think waking up every 3 hours or so is necessarily that bad if you can get back to sleep easily, since that is about the length of a sleep cycle (they get shorter later in the night). Although in your case it might be a symptom of your brain being more active at night and you might not be getting enough deep sleep when it happens.

I've found finding stuff to help stay asleep has been easier than finding stuff to help get to sleep. The articles always talk about sleep drugs being more harmful than helpful, but I think that is mostly stuff that helps you get to sleep (and even those might sometimes be better than not taking them, especialy for brief usage). Certainly I've found a few things that help me stay asleep and significantly improve my sleep quality.

If you have trouble again here are a few things you could try. Short list in order of longer description below (NR = not recommended for various reasons even though it did help, see longer desciption for details): baclofen, phenibut (NR), l-citrulline, l-theanine, magnesium (NR), rosemary extract (NR) or lemon balm (NR), taurine (NR), uridine monophosphate, melatonin patch.

I've found baclofen to be very helpful with staying asleep and getting better quality sleep. I showed some studies I found on pubmed to my primary care doctor who was willing to prescribe it. The downside is that tolerance builds exceptionally quickly and it is generally a good idea to not take it for at least two days a week. I've tried more complicated dosing but 10mg every other day works well (10mg for two days and then a day off works ok too but any longer than that will need two days off to reset in my experience). You can't go up or down by more than 10mg per day (and shouldn't go down by 10mg multiple days in a row) or risk seizures and when I am in a particularly disrupted state it only helps stay asleep for maybe two days at a particular dose. Lately my sleep has been less disrupted even when I don't take it and I've been using for maybe a week or more at 10mg and it still seems to improve my sleep quality.

Phenibut is similar, halfway between baclofen and gabapentin (which I've heard can also help sleep, although I have never tried it since the side effects seem worse than with baclofen). Phenibut has an overlaping set of side effects with baclofen, possibly a somewhat lower seizure risk but some people find it highly addictive. I also suspect it may cause retinal taurine depletion (that leads to permanant retinal damage that is not obvious at first) with heavy continuous use (although that wouldn't be very helpful for sleep since it has the same issue as baclofen). It is available without a prescription and I've found it works better for sleep than baclofen but it causes my light therapy visor to hurt my eyes even on the low setting (it normally does some on high but not on low). 10mg baclofen then 600mg phenibut then a day off seems to work well for me. However, phenibut affects brain dopamine (another fragile part of the body) more than baclofen so between that and retinal issues and the potential for addiciton I would highly recommend just using baclofen.

L-citrulline is another one that I have found very helpful, although I haven't used it as much. It seems to have conflicted with another medication I am on (that I think was building up to too high levels at the time) to cause easy bleeding and a bright pink rash. After lowering the dose of that medication it hasn't caused trouble, but keep an eye out for such things if you try it. I add 3g l-citrulline powder to almond milk at around 6 or 6:30pm when aiming to be in bed at 11pm. It tastes good so you don't necessarily need much to go with it and taking it with water should be fine too. I haven't tried the more common citrulline mallate, so no idea if that would work. I initially tried it because my circulation is not very good so that could be related to why it helps me (or possibly not, nitric oxide and glutathione are sleep promoting substances). I get the "doctor's best" brand l-citrulline powder from vitacost. It is fairly expensive (you can get baclofen for less even if you pay the full cost). N-acetyl-l-cysteine did not seem to do anything for me taken with or without the citrulline.

100mg L-theanine also helps me stay asleep, although not as much as other things and I haven't used it that much. I had an asthma reaction when using it with phenibut, which is another reason I worry about phenibut (although I haven't used it with baclofen so it is possible the same could happen). It is inexpensive and widely available. 400mg or more magnesium is very effective for me but makes me too tired the next day and less doesn't seem to help my sleep. But I'm not sure how common that is so it might be worth a try.

I don't think I've found anything else in typical herbal sleep formulas to be helpful at all except rosmarinic acid (rosmary extract or lemon balm leaves) that helped quite a bit when I first took it but quickly stopped helping and took several months off to have an effect again. It might also potentially cause retinal taurine depletion if you use it for too long, so overall it is not a great option but an occasional lemon balm tea might be helpful (the rosemary extract is also a great flavor with soy or almond milk). Taurine helps me stay asleep but the sulfur makes it not a great choice for extended use if you have digestive issues (and maybe even if you don't).

Another thing that has helped me is 150mg sublingual uridine monophosphate. It seemed to have a circadian effect as well when I first used it (I have a non-24 hour circadian rhythm), but less so after using it for a while. I've lately taken it about 7pm when aiming for 11pm bed time and that seems to work well, although right before bed can work too. It isn't that well known but has been studied some and a different form and much higher dose has been FDA approved as a prescription drug for a couple of conditions. There is some chance it may cause or speed the growth of cancer, although this hasn't been noticed in humans taking the much higher dose yet to my knowledge and hopefully is unlikely at 150mg. The only reputable source I know of for uridine monophsphate powder is nootropicsdepot.com.

While oral or sublingual melatonin wakes me up at night, the first thing I found that really helped me stay asleep was a melatonin patch. The first place I got it from went out of business and the last time I looked the only place I could find that I was willing to buy from was "Respro Labs" on Amazon, but they are quite expensive (I get the 10mg, cut them in quarters, and use one or two quarters a night; the backing is a bit annoying to cut). Also, they last longer than 8 hours (previous patches did too) and make me really tired the next day if I forget to take them off in the morning, which happens quite a bit. But it is still a decent option and I wish they were more widely available and not so expensive.