Drugs used in chemotherapy use different ways to stop cancer cells from dividing so they stop growing or die. This phase I trial is studying the side effects and best dose of decitabine in treating children with relapsed or refractory acute myeloid leukemia or acute lymphoblastic leukemia