A popping knee is not uncommon and it is usually nothing to stop stretching over. Knee joints make a popping noise for one of two reasons: friction or fixation. Neither is usually something you need to be concerned about, although it can be if the popping sound is accompanied by other conditions.
Friction and Fixation
Popping from friction happens when two bones rub together. Fixation popping occurs when two bones are briefly stuck together, or fixated. Fixation most likely happens when you haven't moved your leg for a length of time. When you're immobile for a period, the fluid that lubricates your joints can seep out and make the bones temporarily stick together. When you stretch your leg, you break the sealed bones and hear the popping sound.
When It's a Concern
Although knee popping is normal, knee popping accompanied by pain or swelling is not. Other conditions of concern are if your knee locks up or becomes immobile after popping or if your knee becomes less mobile and more difficult to move. While there are not treatments to stop the popping noise, your doctor can investigate treatments for joint problems or other health issues that could be causing your joint pain, swelling and immobility.
If you continue to pop your knee repeatedly at will, or your knee pops repeatedly with every single stretch, your knee cartilage is likely to become irritated. The wearing out and irritation of the patella can result in a condition known as chondromalacia. Chondromalacia can make it painful just to bend your knee. If your knee pops every time you stretch, rather than only on occasion, modifying your stretches can help prevent the knee popping.
Modifying your leg stretches can be as simple as changing the position of your foot. Turning your foot slightly inward or outward while you stretch can stop the knee pop, particularly if you are upright, according to "Yoga Journal." If you usually walk forward into a stretch, such as stepping up and then reaching to touch the floor, instead try walking backwards into a stretch to help alleviate the pressure on your knee. Positioning your legs slightly differently, such as bringing them closer together or farther apart during your stretching, can also help stop the popping. Another option is to switch to different positions, such as standing rather than sitting, or find new positions that still stretch the same leg muscles you need to stretch.