I'd be fairly sure that common sense can answer this.
Let's consider how sick you are.
1) Feel ill, but not sick enough that a doctor will claim you're SICK. So there's no actual evidence. A hotel is not going to keep you there for free, or everyone would claim this.
2) Ill enough that, say, you can't go to work, but don't need to go to hospital. A doctor can usually certify this (eg flu). Sure, the hotel may want you to stay, but should they do it for free? No! You're welcome to stay, but they'll want you to keep paying. And you're certainly able enough to get a taxi to a cheap hostel or similar or catch your flight home (even though it may be uncomfortable)
3) Ill enough that you need to go to hospital. You can't walk, eat, or similar. What's going to happen? You tell the hotel you're this sick, and you know what's going to happen? An ambulance is going to come, and you're going to be taken to hospital.
Now this doesn't mean that they won't give you a discount if they're generous - I've heard of several doing this for friends of mine who have been stuck in bed (but not needed hospital admission), and other special cases, but there's not going to be an obligation on their part to give free accommodation to sick people.