This phase I trial is studying the side effects and best dose of 5-Fluoro-2'-deoxycytidine (FdCyd) when given together with tetrahydrouridine (THU) in treating patients with acute myeloid leukemia (AML) or myelodysplastic syndromes (MDS). FdCyd may inhibit cancer cell growth by increasing the production in cells of compounds that suppress growth or by otherwise killing cells. Although FdCyd is stable as a drug solution, it is rapidly inactivated by an enzyme present in people. THU is included in the treatment to inhibit the enzyme, prolonging the time FdCyd remains in the body