The Turkish diplomat Khalil-Bey commissioned this work in 1866. Like The Origin of the World , which he also owned, Sleep was not intended for public exhibition. The private nature of the commission gave Courbet greater freedom to exploit the work's erotic content, rendering a subject previously reserved for prints on an unprecedented scale. Courbet drew upon a range of sources for this image—from eighteenth-century Rococo art to popular printed imagery and conventions of contemporary Sapphic literature.
Courbet emphasizes the sensuality of his subject, setting his voluptuous nudes in a neo-Rococo interior, with such details as the loose string of pearls, gold hair comb and enameled vase suggestive of a certain luxury, perhaps that of a high-end brothel. The work's lesbianism must be considered in relation to the work's intended male audience. By 1872, the painting was part of the artist's police dossier, its explicitly erotic subject seen by his contemporaries as indicative of Courbet's moral depravity.