Isn't this what yoga is supposed to help you with? If not what is it good for?
You have tight achillles tendons and they need to be released. When you try folding your legs under you, the knees are pulling extra on what is already a shortened muscle in your leg so the pain increases. Once you release your achilles tendon that pain will be gone and here's how to release it:
While sitting and your leg on your lap, take both thumbs and place them side by side at about ankle height on the tendon on the back of your leg and apply pressure hard and hold. After 30 seconds slowly raise your toes up as far as you can, release the pressure but hold your foot there for another 30 seconds.
For best results relax your body first by taking a deep breath and exhaling then remain this relaxed.