A recent study suggests that thyme as well as ibuprofen can be effective in reducing the severity of pain and spasm from menstrual stomach cramps. The compounds in the herb may also interfere with the perception of pain. Thyme is taken by mouth for bronchitis, sore throat, colic, arthritis, upset stomach, stomach pain, and diarrhea, according to WebMD.