Saltwater acts as a natural disinfectant, helping to cleanse the ulcer and promote healing. It also helps reduce inflammation and alleviate pain.