This medication is used alone or with other medicationsto treat high blood pressure (hypertension). Lowering high blood pressure helps prevent strokes, heart attacks, and kidney problems. Methyldopa works by relaxing blood vessels so blood can flow more easily.