I also agree that drinking any of the teas mentioned might help, and also the massage, but what I found completely eliminated the problem was to take babe to a pediatric chiropractor. We brought ds1 in screaming and handed him to our chiro; she held him gently against her chest and adjusted him with her fingertips at which point he completely relaxed, stopped crying altogether and fell peacefully asleep within a few minutes. His breathing was much deeper too. We brought him daily for that week (our first visit was Monday) and then once/week for the next two weeks.
He never had the problem again. He didn't even scream after the first appointment, and his discomfort dissipated after the first two or three, then it was gone.
I learned how to fingertip adjust our babies and have them checked right after by our chiro and we have not had the problem persist past our recognition of it for any of them.
I drank peppermint when ds3 was suddenly spitting up more than usual and seemed a little out of sorts. He seemed to fell better within a few hours and was back to his normal active self.
I highly recommend chiropractic for babies. Unfortunately, many people don't understand it well enough to know that it is both safe and effective for little ones (as long as you find a skilled practitioner, of course). I've seen so many of our friends' babes suffer for months when I really think they would at least have benefitted from chiro, but they were all afraid and against chiro for their babes, thinking we were insane to bring ours to see one.
Maybe you'll try it?