Although more than two centuries separate Sir Isaac Newton from Sigmund Freud, there were at least two vital similarities between the times when they lived so far as psychoactive drugs are concerned. The first is that these substances were not illegal. The second is that they were not familiar enough for there to be any social or health-based stigma attached to their use, so they were treated quite straightforwardly as medicines.
In the late seventeenth century, the East India Company brought various drugs, such as opium, back to England from India. Initially, none of them were subjected to legal control, and they were often freely sold in coffee shops. Science at the time was barely distinct from magic (it is well known, for instance, that Newton spent a significant proportion of his time on alchemy), and natural philosophers such as Newton, Boyle, and Hook conducted various experiments with psychoactive drugs, often using themselves as subjects.
Freud used both cocaine and marijuana throughout his life, describing the former as a "wonder drug." Cocaine was freely available in the 1880s, when Freud began to use it, and he was even given free samples by pharmaceutical companies for use in his work. He published his first paper on the uses of cocaine in 1884. Within a few years, many European doctors were experimenting with the medicinal properties of cocaine. Freud, like Newton and many others, conducted experiments on himself.