Virginity and marriage

I'm not personally going through this but I was just wondering. If you waited until marriage to have sex, and your husband died can you have sex freely or do you have to wait until you get married again? I know virginity is what you make of it but I'm just wondering through religions eyes is that the case?