Natural languages contain countless regularities. Extraction of these patterns is an essential component of language acquisition. Here we examined the hypothesis that memory processing during sleep contributes to this learning. We exposed participants to a hidden linguistic rule by presenting a large number of two-word phrases, each including a noun preceded by one of four novel words that functioned as an article (e.g., gi rhino). These novel words (ul, gi, ro and ne) were presented as obeying an explicit rule: two words signified that the noun referent was relatively near, and two that it was relatively far. Undisclosed to participants was the fact that the novel articles also predicted noun animacy, with two of the articles preceding animate referents and the other two preceding inanimate referents. Rule acquisition was tested implicitly using a task in which participants responded to each phrase according to whether the noun was animate or inanimate. Learning of the hidden rule was evident in slower responses to phrases that violated the rule. Responses were delayed regardless of whether rule-knowledge was consciously accessible. Brain potentials provided additional confirmation of implicit and explicit rule-knowledge. An afternoon nap was interposed between two 20-min learning sessions. Participants who obtained greater amounts of both slow-wave and rapid-eye-movement sleep showed increased sensitivity to the hidden linguistic rule in the second session. We conclude that during sleep, reactivation of linguistic information linked with the rule was instrumental for stabilizing learning. The combination of slow-wave and rapid-eye-movement sleep may synergistically facilitate the abstraction of complex patterns in linguistic input.