One of the first sedatives was developed in Germany in the 1860s from apples and urine. In fact, from what I've read, the name barbiturate comes from Barbara - the waitress who provided the urine for the first experiments.
Unfortunately, there is no documentation for how in 1865 Adolph Baeyer came up with the idea that combining the urea from urine and malic acid from apples would induce drowsiness. Speculate on that yourself. However, what followed was a significant amount of laboratory research to find out exactly why it worked, and the first sleeping drug barbital appeared in 1903.