Now this is possible with the setHeadingAttributes method. For example, here I redefine the styles of Heading levels 1 and 2.
myHeading1 = {};
myHeading1[DocumentApp.Attribute.FONT_SIZE] = 24;
myHeading1[DocumentApp.Attribute.FONT_FAMILY] = "Georgia";
myHeading2 = {};
myHeading2[DocumentApp.Attribute.FONT_SIZE] = 16;
myHeading2[DocumentApp.Attribute.FONT_FAMILY] = "Verdana";
myHeading2[DocumentApp.Attribute.FOREGROUND_COLOR] = "#555555";
var body = DocumentApp.getActiveDocument().getBody();
body.setHeadingAttributes(DocumentApp.ParagraphHeading.HEADING1, myHeading1);
body.setHeadingAttributes(DocumentApp.ParagraphHeading.HEADING2, myHeading2);
It doesn't seem possible to reset the attributes back to their default, so if you think that a reset will be needed, get the original attributes with getHeadingAttributes and store them in document properties.
Note that changing heading attributes does not immediately affect already existing headings: they stay with their current style unless someone touches their heading level (i.e., selects something from the heading level drop-down, even the same level as the current one). To apply the changes retroactively to existing paragraphs, see this answer.