Contractions

Is it possible to have painful contractions at 24 weeks and then they just go away? All night last night my stomach hurt so bad it was constant pain but it felt heavy and tight as well. I fell asleep and I think I woke up with pain in my lower stomach that was coming and going but it only happen twice but I didnt feel like period cramps it was just pain. I woke up this morning and now my stomach is hurting but its gas and I feel like I might puke.