I agree with Anonymouse88 that it is to do with your digestive tract being blocked.
You may have diverticular disease when little pockets get blocked up and that will cause a lot of pain. When that happens it is called diverticulitis.
If you keep having these problems you may have Helicobacter Pylori bacteria and that can cause bowel problems with severe pain. A stool sample or breath test would confirm whether you have this on not.
If you are eating correctly, drinking plenty of water and fluids and some form of exercise and are still experiencing constipation, then I would advise you to see your doctor.
Best wishes.
Appendicitis usually causes lower right quadrant pain, but there are plenty of exceptions. Based on what you describe, I think you're having some trouble moving things through your GI system. The waves of pain can be caused by the motion of the gut as it tries to push something too firm through, and every time a wave of gut motion comes through, it hurts. You can get gas doing this as well, and the fact that your stomach was rumbling and lying on one side made you feel better makes me think gas/constipation (and bad gas can literally feel like being intermittently stabbed in the gut). Drink plenty of liquids and make sure you get fiber--don't eat too much toast, or you'll constipate yourself more. If you get severe pain again, go to the ER, because there are plenty of dangerous things that can cause severe abdominal pain.
That sounds severe. A ruptured appendix is life threatening. Not to cause panic, but seeing someone is always the best bet. Appendicitis can come and go, but you can hardly go wrong getting it checked out.
For certain, eat only bland foods for a bit with all those symptoms. Clear soups, tapioca, jello. No nuts or anything hard to digest. Whatever you have, you'll be doing your GI system a favor.
Don't panic, though. You could have mild food poisoning (very common) or a GI virus or bacterial infection. I'd expect diarrhea or vomiting to accompany those, but not necessarily. Then there are the odd things. I had an abdominal pain that almost knocked me out of my office chair. But it was on the left side. Best thing they could figure out was a ruptured ovarian cyst (after beau-coups tests). Take care of yourself.