When adrenals are dysfunctional it is common for those symptoms to appear before sleeping, including palpitations, racing heart, anxiety. This is likely tied with abnormal output of adrenal hormones (specially cortisol) when the body shifts to deep relaxation mode.
Hiatal hernia is behind many diseases because it disrupts normal digestion (changes normal digestive secretion output) and affects the vagus nerve by the abnormal stomach positioning. Since the vagus nerve is the highway of brain impulses to all organs, it will create a myriad of symptoms; when glands are affected (adrenals) an obnormal hormonal output can create the symptoms you describe.
Early symptoms of this condition include digestive distress like heartburn, constipation, indigestion, allergies which eludes to the upwards shift of the stomach; these are traditionally treated with antacids/PPIs/allergy medications which simply mask symptoms and dig the condition deeper. Chiropractic manipulation, electroaccupuncture, digestive support (HCl, enzymes) may help with this.