Aw mama, I understand your worry, lalo na first baby mo pa! But honestly, with side and knee pain together at 4 months, please check with your OB soon, okay? Hindi kami dapat mag-assume kung ano yan, kailangan talaga ng doctor to make sure lahat okay with you and baby.
A few of us mums experienced different aches during pregnancy, but the combo you're describing + the sleep trouble really needs professional checking para ma-rule out kung anong causing it. Don't worry yourself too much in the meantime, the sooner you see your doctor, the sooner you'll have peace of mind. You got this!