In a pair of since-deleted tweets early Wednesday morning, Barr blamed the sleep aid for causing her to make a racist joke about former President Obama advisor Valerie Jarrett, whom Barr referred to as a combination of the Muslim Brotherhood and Planet of the Apes.

Her first tweet read: “guys I did something unforgiveable so do not defend me. 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.”

She blamed Ambien again in a later message: “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.”

The makers of Ambien have since responded to Barr’s claims, stating that “racism is not a known side effect of any Sanofi medication.”

But throughout Tuesday night and the wee hours of Wednesday, Barr went on to retweet a bizarre string of Twitter posts — some that called ABC’s decision to cancel Roseanne hypocritical, and others that celebrated the sitcom’s axing, like actor Charlie Sheen’s “good riddance” sentiment.

Barr also issued two separate apologies for her self-proclaimed “bad joke” — one apology on her own Twitter account, and the other published by BuzzFeed — but again followed them up with retweets and likes of supporters who were defending Barr.

Among the retweets were several posts suggesting that Barr’s Roseanne co-stars threw her under the bus by denouncing the racist joke. Her TV daughter Sara Gilbert — who said on Tuesday that Barr’s comments were “abhorrent” — was a frequent target of posts by Barr’s supporters, including one who called Gilbert a “backstabber.”

All told, Barr’s Twitter spree lasted multiple hours and spanned more than 100 tweets and retweets.