It is not clear if this is due to his sense of elation at having beaten his captors, or to his having suffered a nervous breakdown from the stresses he has endured.
There is no clear reason why this occurred, possibly because he was ecstatic at having outwitted his captors, or perhaps due to a mental breakdown caused by the immense difficulties he had encountered.