I had sexually intercourse a day after my period ended and now I am having stomach cramps as if my period is going to start?

When was your period. How long has it been since your period? This may be unrelated or could be due to a pelvic or urinary tract infection resulting from the intercourse. See a doctor to be sure.