I think Dan's reference to Baidu and 陛下 answers the question, but for those who might not understand the Chinese or don't understand the connection. I will also provide an additional answer.
Terms of respectful address like 陛下 and 閣下 arose because it was considered a violation of protocol for a minister to address the emperor directly while he was in formal audience seated in a raised position at the top of the court steps. So ministers would instead direct their speech at the Emperor's close attendants (often eunuch officials) at the bottom of the steps. The Emperor could still hear what was said of course and so could respond directly to the speaker, so the term 閣下 became associated with indirect and respectful address to the emperor.
Calling a king "your majesty" has roughly similar logic. You don't address the king directly, but talk to his attribute, even forcing you to use third person pronouns for this indirect address (e.g., "Does your majesty accept?," rather than "Do you accept").
The term 閣下 has similar logic to 陛下. You don't address the illustrious person directly, but direct your remarks at that person's attendants hanging around at the foot of the "pavilion."