32 C.F.R. § 720.23
(a) Criminal actions. When Federal or State authorities desire the attendance of a naval prisoner as a witness in a criminal case, they should submit a written request for such person's attendance to the Judge Advocate General. The civilian authority should include the following averments in its request:
(3) that the civilian authority will assume all costs of transporting the prisoner from the brig, of maintaining that prisoner while in civilian custody, and of returning the prisoner to the brig from which he was removed.
The civilian authority should also include in its request an estimate of the length of time the prisoner's services will be required, and should specify the mode of transport by which it intends to return the prisoner. Upon receipt of such a request, authority by the Judge Advocate General will be given, in a proper case, for the production of the requested naval prisoner in court without resort to a writ of habeas corpus ad testificandum (a writ which requires the production of a prisoner to testify before a court of competent jurisdiction).