This would be a combination of loopOut() with two keyframes and an additional wiggle for position. Animate one bubble that goes from the bottom to the top (outside the frame at both ends) and add this expression to the position
wiggle(2,25)-value+loopOut()
Then you can control the speed of individual layers by moving the second keyframe and the amount of randomity by adjusting the wiggle settings.
To offset a bubble in time, drag the layer on the timeline so it starts before frame one.
Offsetting both position keyframe at the same time can be a bit tricky if you’re not used to it: Put the current time indicator on a position keyframe, select all position keysframes (by clicking on “position”) and offset the x value by dragging the X value.
Kalleheikki Kannisto
Senior Graphic Designer