As discussed in another question, some people have lower back pain during straight leg raises. Why? Many places on the internet will tell you that these people have weak abdominal muscles, and they can't control the tilt of their pelvis. That is probably true. However, there must be more. I would guess that there is a disk bulge which, together with weak abdominals, is creating the pain. On the other hand, the pain happens when the lumbar spine is extended, and that is not when a posterior disk bulge would be pushing into the spinal cord. Can anyone help me figure this out?
A leg raise is a hip flexion movement. A straight leg just makes the move harder. Hip flexion is done by the "hip flexors", the main one being the Illiopsoas (nicknamed Psoas, pronounced so-as. https://exrx.net/Muscles/Iliopsoas). When this muscle contracts to flex your hip and raise your leg, it pulls on both ends of the muscle. On the EXRX website you can see the insertion and origin, so the 2 points that get pulled are your upper leg and lower back. You want your leg to raise but you don't want your lower back to be pulled into extension. To counter this back extension your abdominals (https://exrx.net/Muscles/RectusAbdominis) contract. As you can see from EXRX this brings the bottom of your ribs and the top of your pubic bone closer together, thus countering the back extension. A leg raise uses the psoas as the prime mover of the leg, and the abs get used to stablise the movement via isometric contraction (they contract yet instead of causing movement, they resist it.) So in answer to your question, lower back pain is caused during a leg raise because your psoas is pulling on your lower back in an attempt to raise your leg, and your abdominals are unable to counter the force. You say this pain only happens when your lumbar is in extension and not when in flexion, which makes sense. Make an active effort to put your hips into 'posterior pelvic tilt', as in put your lumbar in flexion using your glutes and abs. This is the correct position to be in when doing leg raises. Doing this movement will also strengthen your abs isometrically, which should help alleviate lower back pain in other movements.