Antispasmodics work by inhibiting the parasympathetic nervous system, which helps to relax smooth muscles. This is particularly useful in treating conditions like dysmenorrhea (painful periods) and irritable bowel syndrome (IBS), which can often exacerbate gynecological symptoms.