You can only determine the angle at which the accelerometer is in relation to the vertical if it is not accelerating in a horizontal plane. The the acceleration you read from the X and Y sensors should be:
g * sin(phi)
where g is the acceleration due to gravity (about 9.81ms^-2) and phi is the angle by which the axis you are reading (X or Y) is off the horizontal.