Weird behaviour converting velocity to displacement I'm trying to convert accelerometer data from accelerations to displacement,

I assume that the initial velocity is zero and the initial position is also zero.

Here's my code,

Fs = 500;
T = 1/Fs;
t = (0:length(y) -1)*T;

vel = cumtrapz(t, acc);
disp = cumtrapz(t, vel);


here are the respective plots from acceleration to displacement,







what am I doing wrong?

I've implemented a kalman filter but the result is the same. I'm trying to work around with wavelet decomposition, any help would be very appreciated to resolve this problem.
You have two problems here.

First, as hotpaw2 mentioned, double integration is sensitive to any non-zero bias in your accelerometer, which will certainly be present if you are using a MEMS accelerometer. Suppose you have a bias of $b$; then, your position at time $t$ is 

$$p(t) = \int_0^t \int_0^{t^\prime} b \ dt^{\prime\prime} \  dt^\prime = \frac{b}{2} t^2$$.

So, your position is growing quadratically with time.  Not good!

Another problem will be the measurement noise that is riding on your signal.  Double integration of this noise signal will behave like a second-order random walk and will also cause your position to diverge over time.

A common approach to this sort of problem is to use a Kalman Filter.  Also, this is a good introduction to position estimation using accelerometers.