Optical aberrations affect the quality of light propagating through a turbid medium, where refractive index is spatially inhomogeneous. In multiphoton optical applications, such as two-photon excitation fluorescence imaging and optogenetics, aberrations non-linearly impair the efficiency of excitation. We demonstrate a sensorless adaptive optics technique to compensate aberrations in holograms projected into turbid media. We use a spatial light modulator to project custom three dimensional holographic patterns and to correct for local (anisoplanatic) distortions. The method is tested on both synthetic and biological samples to counteract aberrations arising respectively from misalignment of the optical system and from samples inhomogeneities. In both cases the anisoplanatic correction improves the intensity of the stimulation pattern at least two-fold.