Me. Rev. Stat. tit. 14, § 5539
Third person may appear by stipulating for costs
When a person is unlawfully carried out of the State or is imprisoned in a secret place, any other person may appear for him in an action therefor in his name, who shall stipulate for the payment of costs as the court orders.