There's actually a name for this phenomenon: blanket fart.
When you fart under a blanket, the gases become trapped and create a pocket of warm air. This can cause the fart smell to linger and become more potent.
So, if you're looking to avoid offending your sleeping partner, it's best to let those blanket farts rip outside of the covers.