(Greek), Latin, Trophonius. He has visited the cave of Trophonius (Greek). Said of a melancholy man. The cave of Trophonius was one of the most celebrated oracles of Greece. The entrance was so narrow that he who went to consult the oracle had to lie on his back with his feet towards the cave, whereupon he was caught by some unseen force and violently pulled inside the cave. After remaining there a time, he was driven out in similar fashion, and looked most ghastly pale and terrified; hence the proverb.
Source: Dictionary of Phrase and Fable, E. Cobham Brewer, 1894