I got my period during sex

So today I was having sex with a guy we aren't like dating but we have been talking for awhile now, anyway during sex I got my period and I was so scared when we were don't that he would judge me or say something about it but he didn't realise until I said something. 
Has this ever happened to someone else before because I'm freaking out I don't know what to do!!!!!