Foucault agrees that, starting with the rise of the bourgeoisie in the 17th century, tighter controls were placed on discourse about sex, and on discourse about this discourse. There was an effort to control sex at the level of speech. On the other hand, though, this effort to control sex also intensified the discourse on sex.
Confessing sexual misconduct had long been an important part of religious confession, and while the Christian pastoral of the 17th century led these confessions to be less explicit, the range of confession became much wider. People no longer confessed only sexual deeds, but were also expected to confess desires, thoughts, dreams—the slightest inclination toward sex. People were made to be constantly aware of their sexuality and to talk about it in all its aspects. There was an effort to transform sexual desire into discourse. Foucault identifies this aspect of the Christian pastoral with the scandalous literature of later centuries that describes sex in exacting detail.
Around this time, however, discourse on sex was also extended far beyond the realm of the religious confession. First, it became a matter of public interest: sex became something to be studied rationally, to be analyzed and classified and understood as a statistical phenomenon. In the 18th century, people began to study demographics as a means of regulating the population. The sex lives of citizens became an important object of public scrutiny, as statistics regarding birth rates, fertility rates, illegitimate births, and so on became important for public use.
A second instance of the widening discourse on sex appears with regard to children's sexuality. Foucault takes as an example the secondary schools of the 18th century, which were designed and regulated with a constant regard to preventing sexual contact between students: boys and girls were separated, and strict curfews were enforced. In a wider context, children's sexuality became the subject of a great deal of public interest. Even children themselves were taught to speak about sex in a way that would show they had a proper, non- perverse understanding of sex.
Though frank and jovial discussion of the sex lives of youths was no longer acceptable, Foucault sees this silencing as a necessary aspect of the way discourse about children and sex was changing. This crude and course discourse was replaced with a number of complex discourses that employed technical language and expertise that placed a stronger control on their subject matter.
Foucault identifies other centers of discourse in medicine, psychiatry, and criminal justice. Laws prohibiting certain kinds of sex became tighter, studies of sex became more frequent, and the general awareness of sexuality was heightened leading to even more talk about sex. Foucault cites an example of a simple-minded villager who paid young girls for sexual favors being arrested, and passed through the law courts and subjected to numerous psychological studies. An activity that once would have been overlooked was now being written about copiously: more and more, sexual matters were being put into discourse. Whereas in the Middle Ages, discourse on sex was confined to the realm of confession and Christian morality, the 18th century saw a flowering of many different kinds of secular discourse.