If you are already chafed then take a cool shower, pat the area dry and then use a cortisone cream or diaper cream to soothe the area. If I get chafe, I do that routine just before heading to bed and then just sleep in a big t shirt and panty-less. The panties or sleep pants will hold moisture in the area which can irritate the area. If there is no rash, then putting a little bit of gold bond powder on your inner thigh before bed will keep things at bay.
Body Glide helps prevent chafing. When using Body Glide, makes sure the area is clean and dry before applying.