If it's a ligitimate medical diversion generaly the airline eats the cost. As others have said if they didn't they would be open to a lawsuit.
I have heard of airlines going after people in court for cost associated with diversions due to disruptive behaiviour.