One common method for getting rid of hiccups is standing on your head — but scientific studies don’t back this up. (Alla Dreyvitser/The Washington Post)

The last time I had hiccups was four weeks ago when I saw “The Martian.” I loved the book and couldn’t wait to sit back and enjoy the movie. Unfortunately, I started to hiccup right after the previews ended. I was munching on popcorn when the first one hit — HICCUP! Three seconds later, the second one hit — HICCUP! By the time the third happened, I knew things were dicey. I took a swig of water, held my breath for 30 seconds and waited. Fortunately, they stopped before my fellow moviegoers became annoyed.

Before I discuss why hiccups occur, we need to review how you breathe. Your lungs are in your chest cavity, which also contains your heart and some other important structures. Because lungs are squishy, they are protected by the rib cage. Ribs are attached to each other with muscles, tendons and other connective tissue. Another muscle, the diaphragm, separates the chest and abdomen. It’s thin, strong and dome-shaped.

When the diaphragm contracts, it creates a slight vacuum in the chest cavity. This is what causes air to fill your lungs. When the diaphragm relaxes, it returns to its dome shape and air is pushed out of your lungs. If you take a deep breath, chest muscles get into the act and pull even more air into your lungs.

Hiccups occur because your diaphragm rapidly contracts unrelated to taking a breath. This muscular action draws a quick burst of air into your body. About the same time, something tightens in your larynx (voice box) quickly, stopping the inrush of air. This is what causes the chirping sound that’s heard at the end of a hiccup.

Except for some rare diseases that cause hiccups, it’s unclear what triggers them. The most common theory is that one of the nerves that controls the diaphragm is irritated, which causes a spasm in the muscle.

Hiccups usually resolve themselves in a few minutes. Lots of treatments have been suggested over the years, including holding your breath, as I did while Matt Damon was getting stranded on Mars. None of them has been proved to work in scientific studies.

• Breathe in and out of a paper bag for 60 seconds.

• Swallow a teaspoon of sugar.

• Drink a glass of water while you’re bending forward.

• Stand on your head.

• Have someone scare you.

Here are some other interesting facts about hiccups.

• Fetuses, or unborn babies, often get them near the end of a mom’s pregnancy. So in addition to waking your mom by kicking her, your hiccups sometimes caused trouble. (Sorry, Mom.)

• Newborns get them all the time. Fortunately, babies don’t know any better, so hiccups don’t seem to bother them.

• According to the Guinness World Records folks, Charles Osborne holds the record for the longest case of hiccups. They began in 1922 and continued until 1990 for a total of 68 years.

If your hiccups last more than a day or two, have a parent call the doctor. Just check to make sure he or she is at the office. After all, the doctor may be home with his or her own case of — hiccups!

Bennett is a Washington pediatrician. The second edition of his book “Waking Up Dry: A Guide to Help Children Overcome Bedwetting” was published in May.