Thank you for your query. Sometimes, if period is due or about to be due, sexual excitement (like foreplay) may cause severe uterine contractions, resulting in acceleration of the menstrual cycle and beginning of menstruation
If your periods due date were near, I would like to reassure you not to worry, and treat it as any other menstrual period. However, if your periods were far away, or if the bleeding is slight or if foreplay had consisted of vaginal penetration, I would request you to consult a gynaecologist urgently. In some cases, there may be some local pathology in the vagina/ cervix/ uterus
like polyp or tumor
or ulcer, which may bleed during sex/ vaginal penetration.
Hope I've been able to satisfy your query. If you have any further clarifications, please don't hesitate to ask me. Best of luck.