West Virginia Code
Article 6A. Competency and Criminal Responsibility of Persons Charged or Convicted of a Crime
§27-6A-8. Credit for Time; Expenses

(a) If a person is convicted of a crime, any time spent in involuntary confinement in a mental health facility or state hospital as a result of being charged with the crime shall be credited to the sentence.
(b) All inpatient care and treatment shall be paid by the department.
(c) All competency restoration services not covered by other government, third-party funding sources, or other grant agreements shall be paid by the department.