Doesn't osmosis violate the law of conservation of energy?
I'm no thermodynamics expert, but Ill have a go at this.    

The energy comes from the original set up, in which you have created a low entropy state. As the diffusion of water molecules equalises their concentration across the membrane so the entropy of the system will increase. This translates to a negative free energy change. That manifests as potential energy stored in the hydrostatic pressure resulting from the changes in volume, which in turn is available to turn the turbine.

So in the case of an experiment of the type described, the energy is derived from the experimenter who sets up the experimental situation in the first place.