Roseanne Barr has blamed her racist tweet on sleeping pills.

The 65-year-old year-old TV star likened Valerie Jarrett - a former aide of Barack Obama - to an ape and accused her of supporting the Muslim Brotherhood political party on Twitter, but Roseanne has now claimed that her use of the prescription drug Ambien was to blame for her post.

The comedy actress - whose eponymous sitcom has been cancelled by US TV network ABC - wrote on the micro-blogging platform: ''I think Joe Rogan is right about Ambien.

''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. [sic]''

Roseanne also cited Memorial Day - a US holiday that recognises the sacrifices made by the country's armed forces - as another contributory factor.

However, Roseanne conceded that there was no defence for her inflammatory tweet and has offered an apology to Jarrett.

In a now-deleted message, she wrote: ''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. ty. [sic]''

Roseanne has also claimed that being called a racist is much more hurtful than having her show cancelled by ABC.

She explained: ''hey guys, don't defend me, it's sweet of you 2 try, but ... losing my show is 0 compared 2 being labelled a racist over one tweet-that I regret even more. [sic]''

Despite this, the sincerity of Roseanne's apology has since been widely questioned, after she retweeted a series of supportive messages.

And the American star - whose sitcom returned to TV screens in March following a 21-year hiatus - has thanked her followers for their ''kind words''.

She wrote: ''thanks for all your kind comments, everyone! Love u all goodnight [sic]''