Sodium cromoglicate acts by stabilizing mast cells and preventing the release of histamine and other inflammatory mediators such as leukotrienes and prostaglandins. It inhibits calcium influx into mast cells, thus preventing degranulation triggered by allergen exposure. This inhibition reduces the allergic inflammatory response in ocular tissues, alleviating symptoms like itching, redness, and swelling.