Yes. It is a medical expense.
Capital Expenses
You can include in medical expenses amounts you pay for special equipment installed in a home, or for improvements, if their main purpose is medical care for you, your spouse, or your dependent. The cost of permanent improvements that increase the value of your property may be partly included as a medical expense. The cost of the improvement is reduced by the increase in the value of your property. The difference is a medical expense. If the value of your property isn't increased by the improvement, the entire cost is included as a medical expense.
Certain improvements made to accommodate a home to your disabled condition, or that of your spouse or your dependents who live with you, don't usually increase the value of the home and the cost can be included in full as medical expenses. These improvements include, but aren't limited to:
*Installing railings, support bars, or other modifications to bathrooms.
Pub 502