The goal of this clinical research study is to learn if the combination of PKC412 (also called Midostaurin) and 5-azacytidine can help to control refractory or relapsed acute leukemia and MDS. The safety and best dose of the combination of the drugs will also be studied.