Raising two legs together while lying on bed
I suspect it is just physics. Each of your legs makes up about 1/6 of body mass, leaving about 2/3 of your mass superior to your hips.

Raising one leg requires action of the hip flexors (i.e., iliopsoas complex) but also activity in the anterior abdominal wall muscles (rectus abdominis, obliques) and back muscles to stabilize your abdomen. To raise the other leg simultaneously, you recruit the ipsilateral hip flexors. But, importantly, you probably have already maximally recruited most of your abdominal and back muscles.

Imagine the body as a lever system. With one leg raised, you have 1/6 of body mass balanced against 2/3. With both legs up, you have 1/3 vs. 2/3 and with potentially increased torque, because your legs are long (a force acting at a larger distance). The muscle forces to stabilize that must be larger, but the additional muscles are not there.

I can raise both legs with difficulty (admittedly, $n=1$).