I think the cramp=masturbation link is simply because you're tensing up in the moment.
As far as cramps in general, from what I understand it's from being low in potassium.
How long does it take for them to go away? Depends. I know when I have bad ones the next day my leg is sometimes a bit sore. And I can easily get another cramp if I'm not careful.
When you're with your girl next... Just relax. Make an effort not to tense up your legs
But yes, mention this all to your doctor.
(and thank you for the complement, that's very sweet
)