Astronaut movies about the “classic” era, such as Ron Howard’s Apollo 13 or Damien Chazelle’s First Man, have men in buzzcuts doing the heroism up above while the womenfolk are relegated to gathering anxiously around TV sets back on Earth. More contemporary stories, such as Alfonso Cuarón’s Gravity, give women a more active role – and in its ironic and offbeat way, this new movie is another such. It comes from Noah Hawley, the much-admired showrunner of the TV shows Fargo and Legion, now making his feature directing debut. He has worked with screenwriters Brian C Brown and Elliott Di Giuseppi on this fictional version of one of the strangest tales in Nasa history: a tale of sexual tension in space, and what happens when spacemen and spacewomen have to come to terms with the existential boringness of life back on Earth.

It is a witty, intriguing film in many ways, seductively shot by British cinematographer Polly Morgan. I suspect Hawley has taken some inspiration from Sam Mendes’s American Beauty, with its eerie suburban moodscape. But I also feel the film is unsure of how much to disturb its audience, unsure whether to pursue the chaos and embarrassment of a bungled, noir-ish crime and an unsightly psychological disorder, or to contrive something more emollient: to finesse some sympathy and even heroism for the story’s troubled female lead.

It is based on the true story of Lisa Nowak, a Nasa astronaut who was arrested in 2007 for a bizarre kidnap attempt in an airport parking lot, of a female air force captain who was in a romantic relationship with a male astronaut with whom Nowak was enamoured. The movie arranges it so that she has a stultifyingly boring marriage with a nice but dreary man; her attack is targeted at the man rather than the woman, and the film makes the other woman a rival Nasa astronaut. The damaged and obsessive antiheroine is played by Natalie Portman, her lover by Jon Hamm, and her name is changed from Lisa to Lucy, perhaps simply so that at a key moment the movie can play a cover version of the Beatles’ Lucy in the Sky With Diamonds to accompany her slow hallucinatory slide towards a nervous breakdown. Because, having experienced the blazing ecstasy of space travel, seeing planet Earth from above, and getting a mind-bending perspective on the sheer littleness of her existence down below, Lucy loses it, very big time. Especially as she is not picked for the next space mission. Sexual infidelity is one way of recapturing the excitement and the intensity. Jealousy is perhaps another.

Portman is good at suggesting the internalised anguish of a woman under pressure and beginning to crack: it is a role not so far from her Jackie Kennedy in Pablo Larraín’s movie about the president’s wife in shock, in the hours after the assassination. On the surface, Portman’s Lucy is a tough, disciplined officer, impeccably squared away. But her superiors can tell there is something desperate in her. She is married to nice but boring Drew (Dan Stevens) and they are childless which, as in so many movies, is an easy signifier for marital discontent. While waiting to be picked for the next mission, she finds herself in an impulsive sexual relationship with sexy, divorced Mark (Hamm). There is a hilarious cameo for Ellen Burstyn, playing Lucy’s hard-drinking, hard-smoking grandmother.

The movie is good at showing that the problem is actually not that life on Earth is boring after the rocket-fuelled excitement of space travel; it is more that our ordinary lives are revealed to astronauts as fiercely strange. To come back to Earth after a spell in orbit and look at all our workaday rituals: work, home, shopping, etc, is to take a red pill: it is to see how strange all this is and to be unreconciled to it. Here we earthlings go about our business, never quite grasping how astonishing and exotic our existence actually is. The ex-astronaut can’t go back to space and can’t ever again feel at home on Earth.

So Lucy has her breakdown and her bizarre crime scheme – but how to resolve this? How to end this story and reclaim its leading player without simply writing off Lucy as a pathetic clinical case? The film doesn’t quite solve this problem, but it’s an amusing, disquieting footnote to the triumphant story of space travel.