Was it different than how they were were treated under the Czar? Were there particular Marxist-Leninist (Trotskyite?) attitudes towards sex work?
I'm assuming that there, was sex work under socialism. If there wasn't I'd also be very interested to hear about that.
You might be interested in Restructuring the 'Woman Question': Perestroika and Prostitution by Elizabeth Waters. It's available for free.
The USSR, and Communist ideology overall, viewed prostitutes as victims of capitalism. The institution of sex work was a form of economic exploitation and oppression, just as the proletariat 'selling' his body and services was class-based slavery--or to quote Karl Marx, "prostitution is only a specific expression of the general prostitution of the labourer".
Lenin wrote in Pravda in 1913,
"...so long as wage-slavery exists, inevitably prostitution too will exist. All the oppressed and exploited classes throughout the history of human societies have always been forced to give up to their oppressors, first, their unpaid labor and, second, their women as concubines for the 'masters'. ... Our workers' associations and trade unions... ought to organize an "exhibition" of this kind. ... A display of proletarian women's poverty and indigence will bring a different benefit: it will help wage-slaves, both men and women... ponder the conditions for emancipation from this perpetual yoke of want, poverty, prostitution and every kind of outrage against the have-nots".
It wasn't all liberating victims of prostitution and re-educating them about their rights, though. After the state was established, prostitution was supposed to no longer exist--private property had been abolished. It was seen as a theoretical impossibility. Soviet historian P.M. Chirkov wrote in 1979 that "the experience of the USSR has proved that prostitution is explained by social reasons and exists only where there is private property". However, since it (obviously) continued, the reality of prostitution was silenced to maintain the superior image of the state. It wasn't explicitly illegal, but the law still prosecuted prostitutes alongside organized brothels and pimps. When Stalin came to power, prostitutes were sent to labor camps supposedly to be reformed.
The social climate of the USSR itself was also of sexlessness and shame. A famous portrayal of that can be found in the U.S.-Soviet Space Bridge, a telecast series from the 80s which catered to both Soviet and U.S. viewers. "There is no sex in the USSR" is a well-known misquote of Lyudmila Ivanova, who actually said, "Well, sex... (laugh) we don't have it, and we are absolutely against it!" A novel about the daily lives and activities of prostitutes in a Leningrad hotel had to be named the euphemistic "Intergirl", because its previous title, "The Prostitute", was too scandalous. Prostitution and sex in general was indecent to speak of or portray in the media.
Of course, it's no secret anymore that there was plenty of sex work under socialism. The reality of prostitution itself in the USSR is another answer entirely.