As jmaja mentioned, accelerometers alone do not make great tilt sensors. They measure acceleration, all acceleration. When the only acceleration present is that due to gravity, you can measure the tilt angle easily, just some basic trig. The problem is when other accelerations come into play, like hitting a bump while driving, or turning, or hitting the gas or brake, or hitting something else. All of these external forces will screw up the tilt angle you calculate if you only use acceleration to derive it.
For that reason most IMUs pair the 3-axis accelerometer with a 3-axis gyroscope. The gyro measures rotation rates, so it's not susceptible to lateral acceleration. You can't just use the gyro alone either though, since you're integrating rotation rates to calculate angle, any offset will lead to drifting. You need to use both, the gyro for short term noise rejection and the accelerometer for long term stability.
Some pretty advanced Kalman filtering usually goes into this calculation.