First time having sex while on iud

Today was the first time I had sex while on the iud and now it's about 3 hours later and I'm having mild/strong cramps. is that okay?