Many people think stretching is essential to improving flexibility. Runners stretch their hamstrings before hitting the pavement, gymnasts do hyper-splits during their warm-ups and yogis wind down their practice with some forward bends.

But does stretching really prevent tight hamstrings and stiff shoulders? And if so, how?

It turns out that scientists don't fully understand what happens during a stretch.

"Yoga will make you more flexible, but we don't know how," said Jules Mitchell, a yoga instructor and a master's degree candidate in exercise science at California State University, Long Beach.

It is clear that stretching doesn't actually make muscles permanently longer, experts agree. Instead, it may be that exercises such as reaching for your toes train the nervous system to tolerate a greater degree of muscle extension without firing off pain signals.

And traditional, passive stretches may not even be the best way to accomplish that task, the researchers say. [7 Common Exercise Errors and How to Avoid Them]

Muscle tissue

During a stretch, the muscle fibers and tendons (which attach the muscles to the bones) elongate, said Markus Tilp, a sports scientist and a biomechanist at the University of Graz, in Austria.

However, making a habit of stretching will not create a sustained lengthening of the muscle or fibers. Muscle tissue attaches at fixed points in the bone, so the entire muscle complex can't get permanently longer. And if one likens muscle tissue to a rubber band, it would not be a good thing for the muscle to get permanently stretched out, as that would mean a decrease in its elasticity, said Mitchell, who wrote her master's thesis on the science of stretch.

When animals are placed in casts that keep their muscles extended for a long time, their bodies do add additional sarcomeres, or the basic subunits of muscle fibers, but their muscles return to their original shape soon after the animal is removed from those constraints. And in those studies, it's not clear that the lengthened muscles improved the animal's flexibility.

In a June 2014 study in the journal Clinical Biomechanics, Tilp and colleague Andreas Konrad found no differences in people's muscles and tendons after six weeks of a static-stretching regimen.

So, if muscle fiber doesn't get longer as a result of stretching, why does stretching seem to increase people's flexibility?

Nervous system in control

The nervous system is the master conductor determining how far a person can stretch, said Brooke Thomas, a yoga instructor who discussed the science of stretching in a blog post on Breakingmuscle.com.

Nerve endings are dispersed throughout the muscle and tendon, and if a stretch doesn't feel safe for the muscle, those nerves will fire, registering pain and resistance, Thomas told Live Science.

These nerves "will say 'you better stop stretching, because if you stretch further, the muscle will maybe get damaged,'" Tilp told Live Science.

That's why a person under anesthesia, whose nerves are quieted, can be stretched through a full range of motion with no resistance. And healthy babies are born able to do the splits, because they haven't developed a blueprint for ranges of motion that feel unsafe, Mitchell said.

There's no doubt that Yoga practitioners who do triangle poses or splits for years will gradually be able to deepen their stretch. But that's because those repeated poses are retraining the nervous system to be quiet at deeper levels of stretch, a process known as stretch tolerance, Tilp said.

"You're not feeling this pain anymore, and that makes it possible for you to get into a deeper position with an even more flexed joint," TIlp said.

Increasing flexibility

Modern people spend all day sitting, so their nervous systems and muscles become habituated to a limited range of motion. [6 Ways to Make Sitting Healthier]

"The body adapts to the movements you most frequently make," Mitchell said. "The corollary to that is that the body adapts to the movements you don't make: It adapts by not making those movements anymore."

People who want more forgiving hamstrings or hip joints need to stand up, sit, squat, walk and change positions throughout the day, Mitchell said.

Passive stretches may not be the most effective way of increasing flexibility, Mitchell said. Although several studies found that passive-training regimens do modestly increase flexibility, it may be more effective to do something called proprioceptive neuromuscular facilitation (PNF), where people extend their muscles and then try to contract them from a lengthened position, Tilp said.

A study that will be published in the December 2014 issue of the Journal of Sports Medicine and Fitness found that gymnasts could increase their flexibility more after PNF stretching than after static stretches.

People aiming to increase their flexibility in their hamstrings may try doing forward bends and contracting their hamstrings at the same time as they are stretching. Alternately, people can try lying on their back and stretching the hamstrings with a yoga belt, and tightening the hamstrings at the same time as pulling their legs toward their face, Mitchell said.

It works because that kind of stretching loads the muscle with more force at a greater level of extension, which then tells the nervous system that the muscle can be strong and safe at that level of extension, she said.

Follow Tia Ghose on Twitter and Google+. Follow LiveScience @livescience, Facebook & Google+. Originally published on Live Science.