Neck pain is a nagging ailment that affects everyone at some time. In fact, approximately 80 percent of people experience neck pain during their lifetime, and 20 to 50 percent deal with it annually, according to Frank Pedlow, M.D., an orthopedic spine surgeon at Harvard-affiliated Massachusetts General Hospital.

Besides the obvious problem of physical discomfort, neck pain can trigger headaches and cause numbness, tingling, or weakness in your arms. You may have trouble sleeping and difficulty turning your head, which can make driving dangerous.

“Recurring episodes of chronic neck pain also can be associated with serious medical problems, including heart disease, rheumatoid arthritis, or infection,” says Pedlow.

If you suffer from constant neck pain, you should consult your doctor to see if it is related to a medical condition. But for everyday pain that comes and goes, there are ways to keep your neck strong, healthy and pain-free.

The Neck at Work

Your neck has many functions. The neck muscles run from the base of the skull to the upper back and work together to bend the head and assist in breathing. Neck movements are divided into four categories: rotation, lateral flexion, flexion and hyperextension. Rotation is moving the head from side to side, lateral motion brings the ear toward the shoulder, flexion moves the chin toward the chest, and hyperextension tilts the head back.

Most neck pain comes from muscle strains and tension caused by everyday situations; for instance, slouching, poor posture or sleeping with your neck twisted. The mainstays of conservative treatment are nonsteroidal anti-inflammatory drugs (NSAIDs), which offer short-term relief. However, first check with your doctor, as they can have side effects, such as nausea and dizziness, and may interfere with other medications.

Besides this, Pedlow also suggests ice and heat therapy. “Ice after an acute injury like a strain helps control immediate pain, stiffness, and inflammation,” he says. Apply an ice pack to the sore spot, 15 to 20 minutes at a time, several times a day, for the first 48 to 72 hours. If the pain lingers, switch to hot compresses or a heating pad, or take a warm shower.

Keeping the muscles strong and flexible by stretching the neck muscles can further help relieve soreness. Other possible treatments are acupuncture and the Alexander technique, according to a study published in the Nov. 3, 2015, Annals of Internal Medicine. Acupuncture uses hair-thin needles to stimulate specific points on the body to trigger physiological processes that relieve pain. The Alexander technique teaches you how to avoid unnecessary muscular tension by improving posture and alignment.

In the study, researchers recruited 517 patients who had suffered from neck pain for an average of six years. They were randomly placed into groups: one group was offered up to 20 half-hour Alexander technique lessons; those in the second had up to a dozen 50-minute sessions of acupuncture. After a year, pain was reduced by 32 percent for the acupuncture patients and 31 percent for those who had Alexander lessons.

Change Your Habits

One of the best treatments for neck pain, though, is prevention. Lifestyle factors like obesity and stress can raise your risk, so addressing those issues though a proper diet and regular exercise offers protection, says Pedlow. Here are some other strategies to follow:

  • When sitting for long periods, like at the computer or watching TV, avoid slouching or sitting with your head tilted forward. Sit straight, with your lower back supported by a pillow or lumbar support, feet flat on the floor, and shoulders relaxed. Stand every 20 minutes and stretch your neck muscles.
  • Adjust the computer monitor so the top is at eye level. Use a document holder that holds your work at the same level as the screen.
  • Position your car seat to a more upright position that supports your head and lower back. Avoid having to reach for the steering wheel. Your arms should be slightly flexed.
  • Cervical pillows may relieve neck stress by supporting your neck when you sit or sleep. Another option: fold a towel lengthwise into a four-inch-wide pad and wrap it around your neck.
  • When you read in bed, use a wedge-shaped pillow to support your back and keep your neck in a neutral position.

Neck Stretch

  • Relax your shoulders and tilt your head toward one shoulder until you feel the stretch. Hold for 15 to 30 seconds. Repeat on the other side. Repeat two to four times in each direction.
  • For an added stretch, use your hand to gently pull your head toward your shoulder.

Diagonal Neck Stretch

  • Turn your head slightly toward the left and tilt your head diagonally toward your chest and hold for 15 to 30 seconds. Repeat to the right side.
  • Repeat two to four times in each direction.
  • For an added stretch, use your hand to pull your head forward on the diagonal.

Get Your Neck Checked for Arthritis

Age raises your risk of neck arthritis, which affects more than 85 percent of people over 60. As you age, the cervical discs in your neck, which help to absorb shock to the spine, can slowly degenerate, become dehydrated and shrink, which can lead to neck pain. The good news: a study published online Jan. 12, 2016, by Clinical Interventions in Aging found this change tends to slow after age 60.

X-rays and CT scans can confirm a diagnosis of arthritis. Physical therapy is often used to help strengthen muscles in the upper back and neck, which may help with pain. Over-the-counter pain relievers, muscle relaxants and steroid injections also may offer relief.

“Still, it is possible to have neck arthritis and not experience symptoms,” says Pedlow.