Answer: Miracle berries contain a protein called miraculin which modifies sweet receptors in the tongue so they respond to H+ ions.
Miracle berries are a small red berry (Synsepalum dulcificum) native to west Africa. After eating a miracle berry, a person perceives sour foods as being very sweet. This effect is temporary and can last for up to 30 minutes.
Miracle berries are able to alter our sense of taste on a molecular level. The effect is quickly reversible because it is only active at the primary site of action, the taste receptors on the mouth.
Miracle berries contain a glycoprotein called miraculin. Miraculin binds specifically to the sweet taste receptors on our tongues. The protein itself causes the receptor to be activated upon exposure to H+ ions, which generally activate sour receptors. The sweet receptors now activate when a sour food is in the mouth. The sweet receptors then send the signal onto the secondary neuron, which is located in the medulla at the solitary nucleus. Here, that information is processed before being sent further up into the ventral posterior nucleus of the thalamus, then finally, onto the primary gustatory cortex.
Our sense of taste, the gustatory system, begins at the level of the taste receptors in the mouth. The surface of the tongue is covered in papillae, the small protruberances that are used for detecting compounds in the mouth. Papillae come in two sizes, large and small, and only the small papillae contain taste buds. Several taste receptors make up a taste bud.
These taste buds are replaced frequently, as turn over can occur as quickly as a few weeks. Older theories on the gustatory system suggested that there are five different types of taste receptors: sour, sweet, bitter, salty, and umami. However, taste scientists currently believe that there are other receptors tuned for other types of flavors.