After Kashtanka (1976) and Biryuk (1978), two films based on classical Russian books, director Roman Balayan remained inactive for several years as he wasn't interested in making communist films he was offered. According to him, 'Polyoty vo sne i nayavu' became the film where he put all the anger and disappointment accumulated in him within these years.
Director Roman Balayan asked his friend, director and actor Nikita Mikhalkov, to find a writer for this film. Mikhalkov advised Viktor Merezhko and Balayan said later on that the film wouldn't have been made without Merezhko's help. Balayan wanted Mikhalkov to play Sergey Makarov, the protagonist, as well and Merezhko wrote the role for Mikhalkov, but Balayan changed his mind shortly before filming, after accidentally seeing Oleg Yankovskiy in My, nizhepodpisavshiyesya (1981) on TV. Mikhalkov ended up playing a small role of a movie director in the film and Sergey Makarov's wife was played by Lyudmila Zorina, Yankovskiy's wife in real life.
Roman Balayan wanted to make a sequel of this film. Screenwriter Marina Mareeva and himself worked on the script for several years, but gave up the idea in the end.
Oleg Yankovskiy was also acting in Vlyublyon po sobstvennomu zhelaniyu (1982) by Sergey Mikaelyan and in the theatre while 'Polyoty vo sne i nayavu' was filmed, but still he enjoyed working on this film and called this role his favorite. Later on, he acted in five more films by Roman Balayan.