Twitching=muscle. It takes muscle to make something twitch. Twitching in the upper stomach, below the rib cage is in the region of the diaphragm - the muscle that contracts so that you can expand your lungs. Could also be abdominal muscles. Twitching usually comes and goes and is usually not related to anything serious. In rare cases, twitching can be related to electrolyte imbalance.