Lying on your back and bringing your knees toward your chest is NOT the best stretch for your back nor is it even beneficial. While it is common to do these types of back stretches, they are generally not good for your back because you are forcing your spine into a flexed position that it already does more than necessary. For example:
Ways You Forward Bend (Flex) Your Spine
1. Sit for long periods
2. Slump sit
3. Bend forward to reach for things
4. Sit in a reclined position
Clearly you achieve more than sufficient forward movement of your spine and do not need any additional stretching such as knees to chest. If your back feels tight and you want to stretch it, remember that your back muscles have been on a constant stretch during all of the above listed activities. So continuing to stretch your back in the forward direction will not decrease your back tightness.
Best Replacement for Knee To Chest Exercise
Roll over onto your tummy and press up onto your forearms or hands (your hips and lower abdomen will stay down). This can be done by repeating 5-10 times or by holding for 15-20 or more seconds. This puts your spine into a backwards position (extension), which is healthier for your back than knees to chest. The photo shows a pretty difficult stretch, so start with pressing up onto your forearms. If you tolerate that well, then you can progress up onto hands.