Methylation of mammalian DNA occurs primarily at CG dinucleotides. These CpG sites are located nonrandomly in the genome, tending to occur within high density clusters of CpGs (islands) or within large regions of low CpG density. Cluster methylation tends to be bimodal, being dominantly unmethylated or mostly methylated. For CpG clusters near promoters, low methylation is associated with transcriptional activity, while high methylation is associated with gene silencing. Alternative CpG methylation states are thought to be stable and heritable, conferring localized epigenetic memory that allows transient signals to create long-lived gene expression states. Positive feedback where methylated CpG sites recruit enzymes that methylate nearby CpGs, can produce heritable bistability but does not easily explain that as clusters increase in size or density they change from being primarily methylated to primarily unmethylated. Here, we show that an interaction between the methylation state of a cluster and its occupancy by nucleosomes provides a mechanism to generate these features and explain genome wide systematics of CpG islands.