IF there was substantial wrong doing in his conviction--surpression of evidence that would have benefited him; lies by prosecution witnesses; racial discrimination by the jury; etc.--they your friend may be able to sue the state (and possibly any individuals who lied, destroyed evidence, etc.) and recover compensation. But without wrongdoing like that, there probably is no recovery--our systems does not generally compensate people for the cost of defending themselves, or for the time lost before an appeal is won or a conviction reversed or overturned. Your friend should discuss the specifics of his situation with an attorney, who can evaluate whether in his unique circumstances he might have legal recourse or a right to compensation. Good luck.