I feel for you. Heartburn has been an issue for me throughout this pregnancy. I've gotten lots of wonderful suggestions from these boards, though.
Sometimes I've taken slippery elm lozenges (my web searches yielded some results suggesting it wasn't a good idea to take during pregnancy, and others that stated it was fine -- my midwife was fine with it, so I went ahead), and drinking bubbly water like mad (I've heard this makes it worse for some people, but it has the opposite effect for me...so much so that we finally bought a carbonating gizmo so that we could make our own since I was drinking sparkly water by the case). I also have been eating copious volumes of plain whole milk yogurt...again, this is one of those things that seems to make it worse for some women, but I've typically found it to be really soothing.
I've occasionally mixed in teas also (ginger & peppermint), and sometimes that's been helpful as well. I've woken up with some real doozies during the middle of the night in past month or so -- they made my earlier heartburn episodes pale in comparison -- but I've usually (but not always) been able to get enough relief from these to get back to sleep.
Whether you go with another OTC remedy, home remedies, or get a prescription, I really hope you're able to find some relief.
Take care,
nk