Turn one leg right side out and slip it inside the other leg. Match up the side seams that you just sewed and pin from there up both sides of the crotch to the waist. Sew along the crotch, pulling the pins as you sew. I reinforce this seam the same way I did the leg seams by sewing a second seam very close to the first one. Then I clip the curve to leave less fabric in the crotch area. Take the pant leg out of the other one but leave the PJ pants inside out.
Now they should look like inside-out pajama pants with raw edges at the waist and legs. If they don't, ur doing it wrong.