Of course you can but the questions is why to take it? You should be on a regimen of antiacids to prevent stomach acid to come up especially night time.
To long exposure can be bad to your esophagus besides it can injure you vocal cords too. You should be under the care of a gastroenterologist who should check the size of the hernia
and the status of your esophagus.