Follow KDKA-TV: Facebook | Twitter

PITTSBURGH (KDKA/CNN) — Roseanne Barr blamed the sleep aid Ambien for a series of racist tweets that resulted in the cancellation of her show “Roseanne” by ABC on Tuesday.

Barr tweeted, “guys I did something unforgiveable so do not defend me. It was 2 in the morning and I was ambien tweeting.”

In another tweet, Barr doubled down, saying that she has “done weird stuff while on ambien-cracked eggs on the wall at 2am etc –”

no, i didnt i blamed myself. stop lying. Yes, I have had odd ambien experiences on tweeting late at night-like many other ppl do. I BLAME MYSELF OK? it's just an explanation not an excuse, Ok, bully? — Roseanne Barr (@therealroseanne) May 30, 2018

Ashleigh Koss, a spokeswoman for the North America region of Sanofi, the maker of Ambien, said in a written statement Wednesday, “While all pharmaceutical treatments have side effects, racism is not a known side effect of any Sanofi medication.”

People of all races, religions and nationalities work at Sanofi every day to improve the lives of people around the world. While all pharmaceutical treatments have side effects, racism is not a known side effect of any Sanofi medication. — Sanofi US (@SanofiUS) May 30, 2018

Matt Drudge, the founder of the Drudge Report, took a swipe at the pharmaceutical company behind Ambien after they denounced Roseanne Barr’s claim she was on the drug when she made controversial tweets.

In a series of tweets, Drudge said, “The drug company mocking Roseanne for her mental illness while they drug a generation is a new low!”

The drug company mocking Roseanne for her mental illness while they drug a generation is a new low! @SanofiUS https://t.co/KBLYeg2kDi https://t.co/70m5vNliAi https://t.co/K4jsCTvxKf — MATT DRUDGE (@DRUDGE) May 30, 2018

Others took to social media to blast the drug maker as well, calling it the most horrible legalized drug.

The is the most horrible legalized drug. Family member was on it for years. The stories I could tell you. The craziness it created in their mind. — NYC Conservative©️ (@TradeFuturesES) May 30, 2018

Sanofi throwing shade is not something I thought I’d ever see https://t.co/i9BYinZYF8 — Sara Benincasa (@SaraJBenincasa) May 30, 2018

A Senator from Wisconsin even weighed in on the controversy.

Good to hear from Sanofi that racism isn't a side effect of Ambien. Ms. Barr's latest comments remind me of the hypocrisy of some people calling out NFL protesters. Apparently making a mockery of the anthem is better than calling out a real social issue.https://t.co/sV6vmWDrWM — Sen. Lena C. Taylor (@SenTaylor) May 30, 2018

I mean, cool and all but you still make insulin that’s unaffordable. Keep contributing to t1D deaths #insulin4all — Alyssa 😎 (@msalyss85) May 30, 2018

You're medications are a danger to the world, ambian is a horrible thing. My father was put on it and did all kinds of crazy ass shit.

Never remembered any of it the next day.#BigPharma sucks, you're all about the 💵💵💵 — Tom.H (@Nopc4thee) May 30, 2018

Cancelled by ABC and owned by Ambien. Tough week for Roseanne Barr. — Mark R. Yzaguirre (@markyzaguirre) May 30, 2018

A number of celebrities have claimed that Ambien contributed to their odd behavior, including John Stamos and Charlie Sheen, who tweeted, “adios Roseanne! good riddance. hashtag NOT Winning.”

The drug has also been a controversial defense in many legal cases.

In 2010, a man accused of disrupting a trans-Atlantic flight by claiming he was carrying explosives also told the federal marshal onboard that he had taken Ambien, according to court documents. Doctors said at the time that it was very unlikely that the drug was the cause.

“In a person experiencing confusional arousal because of Ambien, you wouldn’t expect to hear comments from that person that seem to fit into the context of the environment that they are in,” said Dr. Michel Cramer Bornemann, a lead investigator of Sleep Forensics Associates. “In this case, a man on board a plane is talking about false passports, bombs, dynamite and blowing up a plane. This seems really at first glance, inconsistent with what we know of Ambien’s side effects.”

Ambien, also known by the generic name zolpidem, is a prescription drug used to treat insomnia that was approved in 1992 by the US Food and Drug Administration. It belongs to a class of medications called sedative-hypnotics.

The drug has a number of side effects including “abnormal thinking and behavioral changes,” which may take the form of “decreased inhibition” such as aggressiveness and extroversion that seem “out of character,” according to information that comes with the drug. Hallucinations have also been reported, representing less than 1% of adults in controlled trials for insomnia.

Researchers have found high levels of zolpidem in the blood of some patients the morning after a dose — so much so, it could affect their cognitive and driving skills. This prompted the FDA to lower recommended dosages for certain people in 2013.

There have been reports of “complex behaviors”: cooking and eating food, making phone calls, having sex and driving. The risk of these behaviors may increase at higher doses and in combination with alcohol or other drugs.

These behaviors “have been reported in patients who are not fully awake after taking a sedative-hypnotic,” drug information documents say. “Patients usually do not remember these events.

“It can rarely be determined with certainty whether a particular instance of the abnormal behaviors listed above is drug induced, spontaneous in origin, or a result of an underlying psychiatric or physical disorder. Nonetheless, the emergence of any new behavioral sign or symptom of concern requires careful and immediate evaluation.”

Barr’s Tuesday tweet, in which she said that Valerie Jarrett, a former aide to President Obama, was the “baby” of the “Muslim brotherhood & planet of the apes,” was not viewed as a one-off. Critics say she’s made objectionable comments and spread conspiracy theories before, including a fringe theory about how Trump has “freed so many children held in bondage to pimps all over this world.”

(TM and © Copyright 2018 CBS Broadcasting Inc. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. CNN contributed to this report.)