If heaven didn't forbid it, I'd sleep with her.
Based on what I read, heaven forbid is more common. But can you use its negative form?
Interesting question
Heaven forbid
is an idiomatic appeal for divine intervention to not allow something to happen
Heaven forbid that happen!
it should not be confused with (ending s )
Heaven forbids
which is a phrase which introduces an action that heaven has does not allow
Heaven forbids that to happen
Using your example sentence
Heaven forbid I sleep with that girl!
I hope I never sleep with that girlHeaven forbids I sleep with that girl.
I am not allowed by heaven to sleep with that girl
Opposites of Heaven forbid are
God willing
God willing they will be on timeHeaven help
Heaven help the little children
An official form or pledge of God willing is So help me God
Heaven help should not be confused with Heaven help us
An opposite of Heaven forbids is
Heaven allows
Heaven allows the sun to shine
In your sentence, if
If heaven didn't forbid it, I'd sleep with her.
is the negation, then
Heaven forbids (does not allow)
is the original sentence.
Heaven forbid is an idiomatic expression.
Heaven don't/didn't forbid is not an idiom but you can certainly use it in the type of construction you have written.
Whether it sounds awkward or stilted is largely an opinion-based question. As a native speaker I don't consider it awkward, although I don't consider it to be common either.
Note that Heaven would only forbid very bad things, and that we don't have any good examples of things we know Heaven does actually forbid. It appears to reserve its forbidding powers for truly horrible things.
If heaven didn't forbid it, I'd sleep with her.
So this is saying that you think sleeping with her would be so terrible that Heaven actually forbids it, and that you would do it anyway otherwise.
I don't think that is what you want to say.
"heaven didn't forbid" is fine because it's a negative form of "heaven forbid", so people can figure out what it means from what the positive form means.