Actress Roseanne Barr File picture: Richard Shotwell/Invision/AP

Washington - The maker of the drug Ambien sought to distance itself from Roseanne Barr after the actress claimed that the insomnia medication had fueled the racist tweet that led ABC to cancel her show.

"People of all races, religions and nationalities work at Sanofi every day to improve the lives of people around the world," the US division of pharmaceutical giant Sanofi said in a tweet Wednesday. "While all pharmaceutical treatments have side effects, racism is not a known side effect of any Sanofi medication."

Just hours earlier, Barr had claimed to have been "Ambien tweeting" when she attacked Valerie Jarrett, who was an adviser to President Barack Obama, by writing: "muslim brotherhood & planet of the apes had a baby=vj."

Read: Trump weighs in on furore over Roseanne Barr's racist tweet

Roseanne Barr apologises to cast and crew after sitcom cancellation

ABC cans 'Roseanne' after TV star's racist tweet

Barr later claimed that the tweet was "a joke," but ABC on Tuesday cancelled the reboot of her TV show, "Roseanne," and ABC Entertainment President Channing Dungey called the star's tweets "abhorrent" and "repugnant."

Barr tweeted an apology to Jarrett for "making a bad joke about her politics and her looks," and offered several more apologies - including one in which she said she was using the sleep aid when she tweeted about Jarrett.

"It was 2 in the morning and I was ambien tweeting, I made a mistake I wish I hadn't but... don't defend it please," Barr said in a since-deleted tweet that prompted Sanofi's response.

Ambien's most common side effects are drowsiness, dizziness, diarrhea and grogginess, the company says. The Food and Drug Administration has warned against risks of morning drowsiness when taking drugs that contain zolpidem, a widely used medication marketed under brand names such as Ambien, Ambien CR, Edluar and Zolpimist. The FDA recommends lower bedtime doses for zolpidem.

The drug, which is a sedative-hypnotic medication, does lead to abnormal behaviour, such as memory loss, anxiety, worsening of depression, suicidal thoughts and, very rarely, hallucinations.

A paper, titled "I did What?" Zolpidem and the Courts," published in the Journal of the American Academy of Psychiatry and the Law in 2011 lists sleeping behaviours that have been linked to zolpidem. These include driving, talking, eating and having sex while asleep. One case cited involved a patient who wrote an email two hours after taking zolpidem and did not remember that she had done so. In another case, a woman who had a 45-minute conversation with her boyfriend after taking zolpidem had no memory of it the next day.

"It's behaviour that's done when the individual is in a sense both asleep and awake at the same time," University of Pittsburgh sleep medicine specialist Daniel Buysse told the Associated Press.

This is not so different from how alcohol affects people, Buysse said, though it can be hard to tell whether the behaviour was really because of the drug.

Ambien also has been linked to many criminal cases, in which defendants claimed they were on the medication and had no memory of the crimes.

For example, Robert Kenneth Stewart, who had admitted to shooting 11 people inside a North Carolina nursing home in 2009, was spared the death penalty after his attorneys argued that Ambien and other drugs placed him in a zombielike state of mind.

In 2014, a Wyoming man who claimed he was on Xanax and Ambien when he sexually abused a 10-year-old girl two years earlier was sentenced to probation. Psychologists who evaluated Glynn Howard Johnson determined that the medications had affected his memory. In 2015, a New York man was found guilty of second-degree murder despite claiming that Ambien fueled the rage that led him to strangle and torture his girlfriend.

Barr is not the first celebrity to claim that Ambien affected her behaviour. Rapper Eminem, for example, called Ambien a "memory eraser," saying it made him forget "five years" of his life. In 2009, Radar reported that Rachel Uchitel had told friends she and golf star Tiger Woods used to have "crazy Ambien sex."

Dictionary.com trolled Barr on Wednesday, tweeting about the origin of the word "ambien," which it says comes from the word "ambient."

"Ambient does not mean 'prone to making racist comments,' but it does mean 'of the surrounding area or environment,' " the tweet said.

* The Washington Post's Emily Heil and Allyson Chiu contributed to this report.

The Washington Post