@SarahGen-- That happens to me too and it's definitely due to excess acidity. Indigestion can cause problems for many hours because that's precisely the problem, your stomach is having a hard time digesting. If you eat very acidic foods, that may also be the cause.
Are you using any heartburn remedies or medications? Try sipping on milk before going to bed. It's a good remedy for heartburn. Also, do not lie down flat. You need to put several pillows under your head to prevent the acid from moving up and causing heartburn. It takes a while getting used to but you will be fine. I have to sleep like that every night.
I have been doing better however since I started taking a proton pump inhibitor. This reduces acid production in the stomach and aids indigestion. It's available over the counter but ask your doctor about it first.