E. Cobham Brewer 18101897. Dictionary of Phrase and Fable. 1898.
Rey de Habas, the child appointed to play the part of king on twelfth-night. In France it was at one time customary to hide a bean in a large cake, and he to whom the bean fell, when the cake was distributed, was for the nonce the bean king, to whom all the other guests showed playful reverence. The Greeks used beans for voting by ballot.