Constantly opening and closing beak.

Does anyone have an idea why a bird would sit just opening and closing it's beak? It was a Herring Gull at the beach today. It just sat for about 5 mins doing this.

Cheers.