Ouch help

I'm 18 weeks pregnant and have woke up with so much stomach pain I can hardly move, I managed to crawl to the bathroom to use the loo but the only time it stops is when I lay flat. Anyone know what this could be ?