This line is uttered during 'A Christmas Carol' by Scrooge after the ghost of Marley visits him.
Did the Victorians at the time associate the digestive system with the cause of hallucinations or causing dreams?
The medieval fascination with bodily "humors" is common knowledge even today, but the fascination of the neoclassical and Victorian era with the stomach and "digestion" is less well known.
By the 18th century a kind of modern medicine was beginning, with an increasing knowledge of organs and anatomy translating into beliefs about the human body and its function that were rooted in that new understanding taking hold. However, there came to be something of a "fad" or fascination with matters of the stomach which peaked in the 19th century. Of course, at the time there were innumerable causes for stomach complaints: questionable diets full of cured meats and pickled things (to say nothing of spoiled, rotten, or adulterated food); a whole panoply of endemic (and occasionally epidemic) enteric diseases ranging from rotavirus and typhoid to cholera and dysentery; other infectious diseases that can cause stomach upset (malaria, flu) including many common types of "food poisoning" (salmonella); common infection of the gut microbiome by helicobacter pylori causing ulcers and gastritis; and so on. These causes, many of them poorly understood at the time, gave rise to a fascination with "dyspepsia" in Britain and the US which expanded into an expansive belief system centered around the stomach and dietary issues. It became the ready explanation of almost all general physical and mental maladies.
Notably, a highly influential British surgeon and educator, John Abernethy, around the turn of the 19th century pushed the idea of the primacy of the stomach and dyspepsia as the central organizing aspect of most illnesses, detailing his theories in a book published in 1809 ("Surgical Observations on the Constitutional Origin and Treatment of Local Diseases") which he was so well known for promulgating he became known as "Doctor My-Book". He also gave his name to one of the first digestive biscuits (the Abernethy Biscuit), which still retains some popularity to this day. By the mid-19th century these ideas had become fairly widespread in the English speaking world, which marked the publication of a tract titled Memoirs of a Stomach (Sydney Whiting, 1853, London). Written from the perspective of the stomach and in a fairly humorous tone it further cemented the stomach's central role in overall health and wellbeing within the popular imagination.
If you look at history from that era you can see this fascination with matters of the stomach, and similarly with pursuits for cure-alls that functioned through this model of digestive health. For example, the Lewis and Clark expedition made sure to carry with them a substantial supply of powerful laxatives and purgatives in the form of "Dr. Rush’s Bilious Pills" (based on the remarkable "wonderdrug" Calomel, aka Mercury Chloride). And, of course, there are the many examples of "digestive" aids including cure-alls, patent medicines, and the humble digestive biscuit (graham crackers, Marie biscuits, McVitie's, and so many others).
When Dickens wrote A Christmas Carol in the early 1840s (and later when it was the product of public readings, initially by Dickens himself, and adapted for the stage) this conception of the primacy of matters of the stomach in physical, mental, emotional, and cognitive health would have been widely understood (and believed) amongst Dickens' audiences and readership. And so when Scrooge talks about hallucinating or dreaming of ghosts due to the influence of indigestion it would have had a much more expansive and believable interpretation than it does today. The equivalent today would probably be something along the lines of chalking up seeing ghosts as a side effect of poor quality control in SSRI medications.
Starting around the turn of the 20th century this fad began to diminish and be replaced with the start of properly modern medicine. More sophisticated understandings of chemistry, biology (and that new science of biochemistry), and of the different functions of the organs replaced the earlier wooly and hand-wavy notions of the body. Germ theory gained prominence and we began to understand the cause of a great many stomach ailments as the result of bacterial or viral infections. People began to understand the actions of drugs taken orally as being absorbed through the stomach and distributed through the body via the blood stream, rather than substances that affected the stomach and thereby mental and physical health through their action on the digestive system.