Deductions & credits

IRS PUB 502 states the following for lodging for medical reasons.

The amount you include in medical expenses for lodging can't be more than $50 for each night for each person.
You can include lodging for a person traveling with the
person receiving the medical care. For example, if a parent is traveling with a sick child, up to $100 per night can
be included as a medical expense for lodging. Meals
aren't included.
Don't include the cost of lodging while away from home
for medical treatment if that treatment isn't received from a
doctor in a licensed hospital or in a medical care facility
related to, or the equivalent of, a licensed hospital or if that
lodging isn't primarily for or essential to the medical care
received.