This phenomenon is called Arnold's ear-cough reflex. It occurs in about 2 per cent of the population and was first described in 1832 by Friedrich Arnold, professor of anatomy at Heidelberg University in Germany.
The vagus (Latin for "wanderer") nerve arises in the brain stem and provides a nerve supply to the external ear canal, larynx, heart, stomach and intestine. Stimulation of the auricular branch of the nerve by objects inserted into the ear canal causes a reflex stimulation of the laryngeal branches of the vagus, which produces the cough in susceptible people.
A variant of Arnold's reflex is vomiting caused by reflex stimulation of the vagal branches supplying the stomach. Wealthy Anglo-Saxons who enjoyed feasting are said to have poured cold water into the ear to produce vomiting when they had eaten their fill so that they could continue to indulge themselves - hence an alternative name for the auricular nerve: the alderman's nerve. The Romans are said to have achieved the same result during their orgies by tickling the ear canal with a feather.
Maurice Little, Maidstone, Kent, UK