Leeches should be stored in boxes containing clean water. Water is the main factor you should consider. Leeches should always stay in clean water.
In their natural habitat, they live in a large ponds with a lot of water resource. You should provide a place for them large enough to move around, surface to hang on and clean water to swim in.
Leeches tend to dirty their water everyday or two as they digest. You should always keep their water clean at all times. Water change is also stressful for leeches. So, you should try to do it as often as it is needed and not to cause any harm meanwhile.
They live in rain water or spring water in their natural environment. You should provide similar ph at your own environment.