QUOTE(Vagrant Dreamer @ Feb 14 2009, 11:31 PM)
Work on the flexibility of your ankles, knees, and hips, outside of lotus position. There are dozens of exercises you can do, and pictures describe them best so I won't try to go over them here, but they should be easy enough to find. Lotus position puts stress on these three joints, and if you haven't developed sufficient flexibility there, it will be nearly impossible to settle comfortably into lotus position, no matter how long you attempt it. The problem is that your body naturally resists extended periods of stretching, so the best you can do when stretching your tendons and ligaments is to stretch for about 30 seconds to a minute, at wide intervals - twice a day every 12 hours for instance.
In yoga there are poses meant to be held, called Bandhas, and poses meant to be moved through smoothly. Most of the asanas fall into this category, and you are not supposed to hold most asanas more than a minute. Seated postures are different and lotus position is a lock, intended to hold your body naturally in a position where you can be relaxed and supported at the same time.
That is my advice. I used to get pain in my ankles and knees until I started focusing stretches that mobilized those joints, now I can sit in lotus for as long as I meditate.
Another thing that might help is making sure you're doing the position correctly. Try pulling your legs/feet into the correct position, and then sliding your sacrum/pelvis back a little bit. This creates a slightly wider area to support you and if your body can relax in that position there will be less discomfort.
peace
If I may correct, Bandhas are what in the english language some people call "LOCKS". They are muscle areas (and or muscle groups) contracted in irder to increase energy or alter the flow of energy in the body. Some say Bandhas are the secret to attain balance, security and comfort during Asana Sadhana. For example, Mula Bandha is done contracting the Pelvis, shooting energy upwards from the root chakra. It is a bandha that also improves balance while in Tree pose, for instance.