You can think of it as an xy graph. For each x position you have a formula for y.
What you have now is basically y=random() which will be jagged no matter what. You can smooth the random by storing random values in a lower resolution array and interpolating with more mesh points.
So roughly you could have an array with 10 random(-100,100) values and with 100 mesh points you could read from that.
t = loopindex/100*10
Y = cosp(array.at(int(t)), array.at(int(t)+1), t-int(t))
Another is to just jam a bunch of sines together with different frequencies, amplitudes and offsets.
Y=50*sin(x/50)+ 25*sin(x/13+33)+10*sin(x*5+100)
Just fiddle with all the values and/or add more sin() till you get a shape you like.
Another option is to use the advanced random function. With it it has a perlin noise function which is a smoother noise.
Y= noise(x*k)*100
Where k is a value to tune the frequency.
The last step would be convert that to distort mesh units.
X = loopindex/N*sprite.width+sprite.x
Y = whatever function you decide to use
Set mesh point (loopindex,0) absolute (loopindex/N, (Y-sprite.y)/sprite.height