If it was possible to 'zero' the position of the phone within the app after it is mounted it shouldn't matter what the orientation is, i.e. the app would know what angle/level the phone was with the bike upright and could make it's calculations from this starting point.
Vibration might be a problem, perhaps securing the phone on a sponge would help

At my level of riding pinpoint accuracy of lean wouldn't be needed; I would be looking at it as a trend along with different lines and sessions. A few degress wouldn't worry me.
Although the lean would be much less, would this feature help those on four wheels with their suspension settings? Combined with G-forces this could be interesting data through corners.