When is it appropriate to have sex after miscarriage ?

Maybe one of you can answer this?! My husband and I try to conceive last month we did but ended up in a miscarriage question is how long did you wait to have sex after a miscarriage? ?