Praise be to Allah.
If a man has intercourse with his wife and does not know that she is menstruating, then there is no blame on him. It says in a hadeeth narrated from Abu Dharr al-Ghifaari that the Messenger of Allaah SAWS (peace and blessings of Allaah be upon him) said, “Allaah will forgive my ummah for their mistakes, what they forget and what they are forced to do.” (Narrated by Ibn Maajah, al-Talaaq, 2033; classed as saheeh by al-Albaani in Saheeh Sunan Ibn Maajah, 1662).
But the wife should tell him of her situation and let him know that she is bleeding in menstruation, because a man may not realize that and he may have intercourse with her whilst she is menstruating, which is haraam according to sharee’ah. In that case the sin is on her. Menstrual blood is something that is well known to women, and when it starts the woman is considered to be menstruating.
If what happened happened without either party knowing, then they are not sinners, because they did not know and they did not do it deliberately. And Allaah knows best.