Your desire to have sex can vary during you menstrual cycle. Some get more excited during ovulation, some during bleeding. There is no reason to refrain from sex during your period if you feel like doing it!
Sex+menstruation? Sure!
Menstruation is no reason not to have sex if you are feeling excited. Physiologically, there are no obstacles to having sex during menstruation. This holds true both with yourself and with other people. If you feel sad, tired or suffer from cramps before the bleeding, sex can actually help because it releases endorphins, oxytocine and dopamine into your system and those are "feel good hormones". It can be worth trying solo sex or sex with someone else in that case. If you don't feel excited or up for sex then you don't have it.
Sexual desire
Some feel more excited during menstruation and that can be caused by hormonal changes. Some experience that the vulva and vagina are more sensitive and more reactive to stimuli. To others, menstruation gives rise to extra sensitivity or feeling affected in a manner that makes having sex unfomfortable. For some people their lust is not affected at all by the menstruation.
Sex with partners
When having sex with partner(s) the most important thing is to talk about it. Different people have different opinions about the combination of sex and menstruation, so talking about it beforehand is a good idea. Some people who menstruate don't want to have sex during the period and some bedpartners may dislike the fact that there is blood. There is sometimes a lack of knowledge that menstruation actually is a natural thing in a healthy body. The menstrual fluids are not more unclean or dangerous than other bodily fluids. Sometimes the sight of blood can make people to react strongly because it is often associated with someone being harmed, and leads to feelings of fright or worry.
Always protect yourself
Be aware of the fact that the presence of blood can increase the risks for some sexually transmittable diseases (STDs) during menstruation. In particular those who are transmitted via blood such as HIV or hepatitis. Safer sex can thus be particularly important during this time. Use a condom, dental dam or femidom to keep safe!
Pregnancy
If you chose to have PIV-sex(penis in vagina) when you are menstruating you will probably not become pregnant since you are most likely several days away from ovulation. There is one exception though: if you have a short menstrual cycle (21-24 days) and have sex at the end of this period the sperms can live inside the vagina for up to 5 days and pregnancy is a possibility.
"It's incredibly important to talk with one’s bedpartner(s) about the pain".
If sex hurts
Some conditions, such as endometriosis, can cause pain during penetrative sex. The pain can be felt both during and after sex. At times it can last from a few hours or up to several days after. Pain during sex can have several different causes, but is often the result of endometriosis that is irritated by jabs or stretching. Another reason can be vaginal dryness due to medication. Lube is a nice addition to many sexual situations but in the case of dryness it's essential.
If you are suffering from pain during intercourse or other forms of penetrative sex you can try different positions and try not to enter as far into the vagina and see if that works better. If it hurts and you aren't already diagnosed with a condition you should go and see a doctor about it! It's incredibly important to talk to ones bedpartners about the pain. Try to let them know when it hurts and suggest other ways of having sex. There are so many different ways to have sex, for example erotic massages, petting, rubbing and oral sex.