As best of my knowledge, you can never install any water heater under any stair well or exit corridor. This would be a hazard to the occupants if there were an emergency at this water heater located under the stair, this would stop them from exiting the building at that area and possibly trap the person or persons in that area. I don't know the code section but I'm sure it would be in the UBC (uniform building code)