Hi kitz,
i'm not sure if you having sex has any real bearing on the ear thing unless you just happen to be in a position that triggers it. Unless of course increased blood flow during arousal is a factor. Does it tend to happen near/after the point of your orgasm?
I would suggest that you visit an ent specialist (ear, nose & throat), mention the problem you are having and get your ears examined. If you're in the uk you would see your gp (general practitioner) first and get a referral.
Perhaps your ears are a little blocked and the activity during sex plus the position you are in is causing wax to shift, which would then be relieved by the change in gravity when you stand up?
I'm clutching at straws a little, but you need to get it checked out. You could always try some over the counter ear drops and see if the help.
All the best, take care....