You can change page size and margins with PageLayoutProperties class.
About the page orientation, you can switch the width and height of the page to get the landscape orientation, but I am not sure if it is the right way to do it.
public static void main(String[] args) throws Exception
{
    TextDocument odt = TextDocument.newTextDocument(); // From the simple odftoolkit
    odt.addParagraph("Test text...");
    // Getting the page layout properties
    StyleMasterPageElement defaultPage = odt.getOfficeMasterStyles().getMasterPage("Standard");
    String pageLayoutName = defaultPage.getStylePageLayoutNameAttribute();        
    OdfStylePageLayout pageLayoutStyle = defaultPage.getAutomaticStyles().getPageLayout(pageLayoutName);
    PageLayoutProperties pageLayoutProps = PageLayoutProperties.getOrCreatePageLayoutProperties(pageLayoutStyle);
    // Setting paper size "letter", portrait orientation
    pageLayoutProps.setPageWidth(215.9); // millimeter...
    pageLayoutProps.setPageHeight(279.4);
    odt.save(new File(System.getProperty("user.home"), "letter_portrait.odt"));
    // Setting paper size "letter", landscape orientation : just switch width/height...
    pageLayoutProps.setPageWidth(279.4);
    pageLayoutProps.setPageHeight(215.9);
    odt.save(new File(System.getProperty("user.home"), "letter_landscape.odt"));
    // Setting paper size "legal", portrait orientation
    pageLayoutProps.setPageWidth(216); 
    pageLayoutProps.setPageHeight(356);
    odt.save(new File(System.getProperty("user.home"), "legal_portrait.odt"));
    // And so on...
    // And you can also set the page margins
    pageLayoutProps.setMarginTop(10);
    pageLayoutProps.setMarginBottom(10);
    pageLayoutProps.setMarginRight(10);
    pageLayoutProps.setMarginLeft(10);
}