Hiccups are a very unusual body reflex that is thought to occur primarily due to stimulation or irritation of nerve endings in the esophagus and stomach. These nerves feed back towards the brain and result in reflexive rhythmic contractions of the diaphragm, which leads to the hiccups.
Most of the time hiccups are totally benign and not caused by a serious medical problem. The most common causes of hiccups are things that overdistend or irritate the esophagus or stomach, such as overeating, carbonated beverages, spicy foods, and the like. Therefore, for most people, simply eliminating these potential causes is enough to make the problem go away.
It would be worth talking to your primary care doctor
about the issue, especially if it is persistent. I say this because the association between lying down and having the hiccups starts suggests to me that potentially the underlying cause might be acid reflux
. Your doctor can evaluate you for this condition, as well as for other related problems, and determine whether treatment might be indicated to see if the problem with hiccups can be cleared up.
Start by calling your doctor and setting up an office visit at your earliest convenience -- and good luck!