“The Science of Sleep” is a film that resists easy categorization. At its heart, it is a love story, but one so deliberately rife with idiosyncrasies and other peculiarities that it twists, reinterprets and at times completely ignores the conventions of the genre. Infused with a healthy dose of magical realism and strongly indebted to the Surrealist movement, “The Science of Sleep” is visually ingenious and a true cinematic delight.

Michel Gondry, of “Eternal Sunshine of the Spotless Mind” acclaim, both directed and wrote (sans Charlie Kaufman) “The Science of Sleep.” Like “Eternal Sunshine,” “The Science of Sleep” explores the complex and mysterious inner workings of the human subconscious. In his latest installment, though, Gondry imagines the subconscious not as a treacherous landscape of repressed emotions and sexual desires, but as a charmingly innocent psychological safe haven.

The film begins deep within the anxious recesses of Stephane’s (Gael Garcia Bernal, in a refreshingly light role) REM cycle — the audience is first introduced to the wayward, offbeat leading man as the host of Stephane TV, a cooking show filmed with a cardboard camera in an egg crate and plastic curtain-lined studio that offers dream-inducing recipes (random thoughts; reminisces; memories from the past; loves, friendships and relationships; and songs heard throughout the day, in case you were wondering).

After the untimely death of his father, aspiring artist Stephane has moved from Mexico back to Paris to be with his mother. Working in a creatively barren job — type setting for a calendar making company in a dingy Parisian basement — with annoying colleagues (notably the sex-obsessed Guy, played by Alan Chabat), Stephane escapes his daily moil by stumbling into a tenuous would-be romance with his equally eccentric neighbor Stephanie (the unconventionally attractive Charlotte Gainsbourg).

Other than this skeletal outline, it seems fruitless to offer much synopsis for a film with a nebulous plot that is told in three languages. For Stephane, and perhaps Gondry, the fabric of space-time is less silk and more chunky cable-knit sweater. The plot is not merely nonlinear; it loops back around itself, gyrating and spiraling through time. There is little delineation between Stephane’s bizarre and imaginative internal drama and the actual events happening around him. Some may find it frustrating that dreams and reality so freely commingle, and that it is often unclear whether the entire narrative is unfolding in Stephane’s head — for example, Stephane’s old, restored children’s toy turned one-second time machine begins working during one of the “real-life” sequences involving him and Stephanie.

But “The Science of Sleep” is, above all else, a love story, and the confusing relationship between hopes, fears and literal existence is perhaps the best way to recreate the emotional drama and total experience of romance. After all, relationships — especially new relationships — are too informed and influenced by past experiences, hesitations, misinterpretations and imaginings to conform to a traditionally linear plot.

The sparks that fire and misfire between Stephane and Stephanie are creative as well as romantic. Stephane is a hopeful illustrator and fantastical inventor, while Stephanie knits and creates charming albeit painfully childlike dioramas out of old stuffed animals and other gathered materials. This arts-and-crafts aesthetic is mirrored in the papier-mache and cardboard stylizations of Stephane’s dreamscapes. Using a humble assortment of ordinary materials, Gondry eschews computerized imagery and instead uses stop-motion animation to erect the structures of Stephane’s inner world.

This old-world, childlike innocence is pleasantly endearing, and acts as a nice foil to Stephane’s rather brutish and immature sexuality, which often manifests itself in hilarious and equally charming ways. While “Eternal Sunshine of the Spotless Mind” had humorous moments, the film’s somber, melancholy undertones proved pervasive. “The Science of Sleep,” by contrast, is whimsical, quixotic and jokelessly laugh-out-loud funny.

Eventually, though, the tone of the film changes. Stephane and Stephanie’s awkward coquetry slowly becomes frustrating and desperate, and the film’s both abrupt and easily anticipated ending leaves one feeling slightly sad — sad that Stephane and Stephanie’s fate remains unclear, or perhaps that such a winsome film had to come to an end.