Quote from meandragonbrett
Ranitidine is a Histamine2 antagonist.
To elaborate somewhat; it is believed that H2 histamine blockers in conjunction with H1 blockers such as diphenhydramine have a synergistic effect; in other words, the two drugs potentiate each other when given together in the presence of a histamine reaction. This is an off-label use of an H2 antagonist, by the way.
Additionally, H2 blockers can relieve the increased acid production which is a potential after effect of the catecholamine dump that will almost assuredly occur in a true histamine reaction.