Posting racist tweets is not listed as a possible side effect of taking the sleep drug Ambien.

But the official medication guide from the drugmaker Sanofi does warn of a risk of "more outgoing or aggressive behavior than normal" and engaging in an activity without being aware of it.

Does Roseanne Barr deserve any slack?

The comedian said the drug caused her to post the now-infamous tweet about Valerie Jarrett, the former senior adviser to President Barack Obama, which in turn led ABC to cancel the reboot of her TV show. Jarrett is African American, and Barr tweeted that Jarrett looked like the result if the "Muslim brotherhood & planet of the apes had a baby." (Both tweets were later deleted, though Barr's apology remains online.)

Sanofi, which has U.S. operations in Bridgewater, N.J., was quick to repudiate Barr's claim that Ambien was to blame.

"People of all races, religions and nationalities work at Sanofi every day to improve the lives of people around the world," company spokeswoman Ashleigh Koss said. "While all pharmaceutical treatments have side effects, racism is not a known side effect of any Sanofi medication."

Karl Doghramji, medical director of the Jefferson Sleep Disorders Center, was more guarded in his assessment.

Like alcohol and some other sleeping pills, Ambien and its generic equivalent, zolpidem, can lower a person's inhibitions and lead to aberrant behavior, Doghramji said. That risk is especially pronounced if the drug is taken along with alcohol or other sedatives, or if the patient suffers from sleep apnea or has a history of "unusual" behavior, he said.

But in such cases, is the drug revealing or amplifying a person's true character? Is it prompting behavior that does not reflect the essence of that person? Or is the patient simply using the drug as an excuse?

Impossible to say, said Doghramji, a professor of psychiatry at Thomas Jefferson University's Sidney Kimmel Medical College. People have all sorts of bizarre, fleeting impulses that do not represent the person as a whole, and a sleeping pill could result in those being translated into action, he said.

"The frontal lobe needs to be functioning properly to make sure that whatever thoughts and feelings we have inside our minds are expressing themselves properly and in a socially acceptable manner," he said. "I've seen too many unusual things happen with patients who've been taking these sleeping pills or alcohol or whatever. That doesn't necessarily mean it represents that human being."

The most common side effects associated with Ambien are "drowsiness, dizziness, diarrhea, grogginess or feeling as if you have been drugged," the manufacturer says.

Other possible effects quoted on the product information include:

Getting out of bed while not being fully awake and do an activity that you do not know you are doing.

Ambien and other forms of zolpidem also may have lingering effects the day after they are taken, according to a 2013 warning from the Food and Drug Administration that was updated a few months ago.

The agency recommended that physicians consider prescribing lower doses of the sleep aid because enough of it can remain in the bloodstream the next day to impair activities that require alertness, such as driving.

"Patients with high levels of zolpidem can be impaired even if they feel fully awake," the agency said.

In her tweet, the comedian did not specify whether she used a regular or extended-release form of the drug.

Whether her racist tweet really was prompted in some way by Ambien, Barr has previously engaged in offensive behavior without offering the drug as a reason. In 2013, she likened Susan Rice, another African American woman in the Obama administration, to an ape.

Barr is not the first celebrity to blame unusual behavior on Ambien. Years ago on David Letterman's talk show, Steve Martin said the drug caused him to play poker online in the middle of the night without realizing it. Martin claimed he won $1,000 while under Ambien's influence, but was so alarmed by the experience that he stopped taking the drug.