Baby’s foot may be kicking against your ribcage when you lie down. You may consider propping yourself up with more pillows so you’ll be a bit more upright and hopefully baby’s leg won’t be at your ribcage? Sometimes I rubbed the area with my fingers to try to coax my baby to move her leg away 😅
Hi, Kindly consult your doctor for the same.