He realized that it would be good for his health to get out of this house as soon as possible.
He realized that he had to leave this house for the sake of his health.
He realized he had to stay in that house, for his health to improve.