This phase II trial is studying how well vorinostat works in treating patients with recurrent or persistent ovarian epithelial or primary peritoneal cavity cancer. Drugs used in chemotherapy, such as vorinostat, work in different ways to stop the growth of tumor cells, either by killing the cells or by stopping them from dividing. Vorinostat may also stop the growth of tumor cells by blocking some of the enzymes needed for cell growth.