Indeed, the medication guide for Ambien lists rare side effects like “getting out of bed while not being fully awake and do[ing] an activity that you do not know you are doing” and “abnormal thoughts and behavior ... more outgoing or aggressive behavior than normal, confusion, agitation, hallucinations, worsening of depression, and suicidal thoughts or actions.”

“Basically part of the brain is asleep, while other parts are still active, explaining why your memory might fail you, or why you have lost normal inhibition,” van der Helm told me.

However, she added, “I’m not aware of examples where someone is tweeting certain views (in this case racist views). And I’m also not aware of research showing that such views could be expressed when in (the waking) reality they don’t have any such beliefs or thoughts.”

It’s worth noting the examples of Ambien-induced texts posted online tend to be less coherent than Barr’s. Most of the Ambien messages are full of spelling errors, missed spaces, and instances of “because” spelled “bevayse.” They don’t make a lot of sense. Barr’s text, meanwhile, did—it’s just that its meaning was vile.

David Juurlink, of the Sunnybrook Health Sciences Center, was similarly skeptical that Ambien could produce hateful thoughts. “Drugs like Ambien can absolutely influence one’s actions,” he said. “But in this instance, I think there’s a distinction to be drawn between the decision to tweet something and the content of the tweet. Ambien could certainly prompt an ill-advised tweet, but it wouldn’t explain bigoted or racist content.”

In other words, Ambien might make you tweet with abandon, but it probably won’t make you think racist things if you didn’t already. Sanofi, Ambien’s manufacturer, tweeted as much earlier today:

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

Even if Barr had not aired her views online, the argument could be made that she should not have had a sitcom in the first place if she does in fact harbor such animosity toward people of color. But in general, the incident is also a reminder of how easy it is, these days, to slip between private thoughts and public snafus. Now that we have so many ways to communicate with the outside world, and so many drugs that alter our behaviors, it’s worth considering whether more internet companies should offer sobriety checks before allowing users to broadcast their unfiltered thoughts.

Van der Helm said it’s recommended that people not take Ambien until they’re actually ready for bed. Or better yet, don’t take it at all. Other therapies are safer and more effective for sleep.

Rachel Salas, an associate professor of neurology at Johns Hopkins Medicine, suggests people “put a passcode on your phone to make it more difficult to send texts, tweets, or make purchases.” But if you can start a car on Ambien, as Jack Nicholson reportedly did once, you can likely unlock your phone.

Perhaps we need something like Google’s erstwhile goggles feature—meant to prevent drunk emailing—but for Twitter.