Marital sexual relations are prohibited during times of national crisis, such as widespread famine or war. Only those who have not yet fulfilled the mitzva of procreation may be intimate during such times (Ta’anit 11a; SA 240:12; MB ad loc. 47). On mikveh night, many permit marital sexual relations even in times of crisis (SA 574:4). Others are stringent (MA). If a man’s urge is overpowering him, making him likely to sin, he may have sexual relations with his wife even when the world is in crisis (MB 240:46).
On Yom Kippur and Tisha Be-Av, sexual relations are forbidden as one of the five activities prohibited on these major fast days. In order to ensure that they not end up sinning, husband and wife should behave on these days as they do while she is a nidda. That is, they should neither touch each other, nor sleep in the same bed (SA 615:1; MB ad loc. 1). However, during the day of Tisha Be-Av, which is not as strict, they may touch, since there is little concern that it will lead to intimacy. Still, even on the day of Tisha Be-Av, they may not touch affectionately or sleep in the same bed (Peninei Halakha: Zemanim 10:9; Peninei Halakha: Yamim Nora’im 8:7).
A person observing the seven-day mourning period (shiva) may not have sexual relations, because the mitzva of ona must be fulfilled joyfully, while a mourner is grieving (Mo’ed Katan 15b; SA YD 383:1). However, a mourner need not observe the additional rabbinical restrictions (harḥakot) of nidda. Therefore, husband and wife may touch, and she may make his bed in his presence. Still, hugging and kissing of a sexual nature are prohibited (Rema, YD 383:1; Nehar Mitzrayim, Hilkhot Avelut §113; Shulḥan Gavo’ah 342:14). If the mourner plans to sleep in their own bed, the couple must separate their beds to avoid a situation that may lead to sexual intimacy (SA ad loc.). It would seem that a comforting hug and a polite kiss are permitted, as long as they are not sexual in nature. Upon conclusion of the shiva, the couple should resume fulfilling the mitzva of ona completely. It is even a mitzva for the wife to adorn herself for that purpose, even during the thirty-day mourning period (SA YD 381:6).[14]