After a racist Twitter outburst cost Roseanne Barr her eponymous TV show, the star took to the social media site to blame her poor judgment on the sleep drug Ambien.

“guys I did something unforgiveable so do not defend me,” she wrote in tweets early Wednesday that have since been deleted. “It was 2 in the morning and I was ambien tweeting — it was memorial day too — i went 2 far & do not want it defended — it was egregious Indefensible. I made a mistake I wish I hadn’t but...don’t defend it please.”

The “unforgivable” incident was her Tuesday tweet that Barack Obama’s top adviser Valerie Jarrett, who is black, is the offspring of an ape and the Muslim Brotherhood. As Vox’s Todd VanDerWerff wrote, the tweet “was the nail in the show’s coffin, but the star’s conspiracy-obsessed, constantly-flirting-with-overt-racism Twitter feed was always a ticking time bomb.”

Though Barr vowed to get off Twitter, by Wednesday she was tweeting explanations for her actions, and this is where Ambien came in. “Not giving excuses for what I did(tweeted) but I’ve done weird stuff while on ambien — cracked eggs on the wall at 2am etc,” she wrote.

Like all medications, the popular sleep aid does indeed often incur side effects: More than 10 percent of people who take the drug experience headaches, dizziness, and drowsiness. Diarrhea, nausea, and allergic reactions are also pretty common.

Much more rarely — in between 1 and 4 percent of users — Ambien has been associated with odd behavioral and psychiatric side effects, including hallucinations, disorientation, and disinhibition.

Fewer than 1 percent of Ambien users have also reported experiencing abnormal thinking, delusions, and aggressive behavior while on the drug, according to UpToDate, the physician’s guide to medical evidence. Other sedative and hypnotic drugs can also cause these reactions, and some Ambien-induced odd behaviors — eating buttered cigarettes, sleep driving, playing online poker — are pretty scary, as Forbes’ Matthew Herper pointed out.

But again, these behavioral side effects are uncommon — and quite different from making racist slurs. That’s why medical Twitter reacted to Roseanne’s Ambien comments with disbelief and dismay:

Ambien has quite a few side effects but racism isn’t one of them. Even if Roseanne wanted to claim she had an Ambien blackout and was sleep tweeting, that racism had to come from somewhere deep within. — Eugene Gu, MD (@eugenegu) May 30, 2018

I did a quick literature search on Ambien-induced racism pic.twitter.com/BCqSPd5v5f — David Juurlink (@DavidJuurlink) May 30, 2018

Dear @therealroseanne Ambien does not make you racist, being racist makes you racist — Jennifer Gunter (@DrJenGunter) May 30, 2018

Roseanne’s Ambien tweets prompted the drug’s maker, Sanofi, to tweet that the company employs people of “all races, religions and nationalities” and that “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

Ambien’s rare potential side effects also can’t explain the comedian’s entire Twitter history. As Vox’s Jane Coaston reported, Roseanne’s Twitter feed has been peppered with extreme views and conspiracy theories for years:

She promoted Pizzagate. She believes 9/11 was an inside job. She flags vaccine conspiracy theories. She called Israel a “Nazi state” in 2009 and promoted a Holocaust-denying musician in 2013. Then she turned around and became a massive supporter of Israel (and a rabid opponent of the Boycott, Divest, and Sanctions movement).

So it seems Barr’s problem is much bigger than Ambien.

But if Ambien is fueling some of the poor judgment she’s demonstrated on social media, she should talk to her doctor about trying another sleep aid.