Has anyone else experience sharp abdominal pain?

Last night i was laying in bed and i got this sharp pain like someone was shoving sharp needles in to my stomach and it went away but 2 min later it came back and it hurt so bad so i went to the bathroom and ever since i did that it hasn't returned.