And it's always the same type of curly hair. I noticed that they usually braided their hair when they went to sleep - is that how they kept it curly? Or is some aesthetic Hollywood choice?
It's tough to say whether or not curly hair was in during the period you're talking about. Curls were very frequently worn, but alongside hairstyles that were sleek and shiny; or else the whole hairstyle might be wavy and a bit frizzed, but not curly as such. Let me give a brief rundown of some hair history.
To spring off what colevintage said about the 18th century, the heavily "done" hair of the 1780s gave way to a "naturally wild" look, with lots of layers and curls and wispy bangs. As the novelty of disorder wore off, it became more fashionable to have hair elaborately braided and pinned up into styles approximating ancient Greek or Roman art, with curls around the face. The hair behind these curls, though, could be curly or not curly - the curls in front came from styling, and could even just be held in place with a gum Arabic solution. These curls got more intense and more voluminous through the 1820s and 1830s, at the end of which they were generally longer, dangling sausage curls. But you'll notice in portraits of this period that the rest of the hair is portrayed as smooth.
The dangling curls mostly disappeared by about 1845 (they still reappeared from time to time on young women), and hair that was smoothed down fully was most fashionable until the 1870s. That's when tightly curled poodle bangs came into fashion, as did longer and thicker sausage curls. Additionally, photographs show hair that's often somewhat frizzy and wispy, perhaps with less product in it. While the sausage curls didn't last out the decade, the bangs stayed through the 1880s and into the 1890s, changing a bit in form and style over the years. Thought bangs went out, we still see that kind of soft/wavy/frizzy/etc. hair in painted portraits and photos in the Edwardian era, 1910s, and even the early 1920s - during the latter two decades, with more pronounced curls worked into the hairstyle.
This is not well-depicted onscreen. Movie hair is always strongly influenced by contemporary fashions - right now, sleek hair with a curl to it is what's seen as the most beautiful, so most eras get represented in that way these days. You'll find this very noticeable if you check out a costume drama from the 1960s or 1970s.
Do have a particular time period in mind? The maintenance of hairstyles varies widely through time. For example, once we reach the 1920s permanents were an option to help achieve the waved and curled styles. Even just the change between pomade to setting lotions to hairspray makes a big difference in the answer. Also, keep in mind that washing the hair daily is a very recent habit, so having it styled or set twice a week may be all that was needed.
What period do you mean? For example in the Georgian era curly hair was simply in fashion, for both men (wigs) and women; fashions also lasted for much longer in that time period than they do today (in general).