Hello and hope you are doing well.
The ulcer could cause pain and difficulty sleeping. But the symptoms could be the side effects of the medications. Discuss your symptoms with your consulting doctor he may change the dose or the medications.
In the meantime to reduce acid levels try good life style measures. Take frequent small meals. Avoid spicy and oily food. Eat dinner about two hours before sleeping. Elevate the head end of the bed. Keep a food diary and note down what aggravates your symptoms and avoid them. Ensure to maintain optimum weight by regular exercise. Avoid NSAID's, quit smoking, eliminate alcohol, avoid caffeinated beverages and reduce stress levels. These measures need to be practiced long term for results.
Hope this helped and do keep us posted.
I also have sleeping issues. Mine are because of a medication i take, not for gastrointestinal issues, though. I find that during the day, if I do some sort of meditation according a Mindfulness practice, that I am more relaxed when going to sleep. "Full Catasrophe Living" by Jon Kabat-Zinn is a good starter book for meditation and health, proven to work in a clinical setting. I also do some visualization techniques when going to sleep, imagining either one of my "happy places," or something that has a lulling repetitive motion, like a camel walking in the desert, or falling snow.