Waking up with a crick in your neck is one of the worst ways to start your day. Turing your head hurts anywhere you look and the worst is that you have no idea why. Here's what causes it and what you can do to help yourself avoid it in the future.

To look into the science behind the ol' pain in the neck, Kevin Loria at Business Insider spoke with Dr. Charles Kim, a musculoskeletal expert and assistant professor at the NYU School of Medicine. The cause of the crick is what you'd expect, a strain or pull of the muscles, joints, ligaments, and tendons that hold your head up, but arthritis could be the cause for older people as well. When it happens, there are a few things you can do:

In the meantime, Kim recommends light stretches to ease pain. He says you should generally be able to loosen some of the tension that way. Gently massaging that sore part of your neck in a hot shower can help, especially if the injury caused some inflammation. A short course of acetaminophen or ibuprofen should reduce your discomfort in that case, too.

To avoid it in the future, Dr. Kim also recommends a few preventative tips:

If you sit at a desk, make sure your workstation allows you to keep your spine in a neutral position with your computer screen at eye-level.

Avoid using too many pillows or overly-soft pillows that don't provide enough support when you sleep.

Exercise regularly. We tend to strain the muscles we strengthen the least, so consider some exercises that work your back and neck.

When you get a crick in the neck, it's not the end of the world, but it's certainly unpleasant. Work on proper neck posture and stretching, and remember that your sleeping position can have a huge effect. Don't let a pain in the neck ruin a good night's sleep. To learn about the science behind common neck strain and pain, check out the full article at the link below.