Carroll's inspiration for the story came primarily from his interactions with the Liddell sisters, especially Alice Liddell, during boating excursions on the River Thames in Oxford, England. It was during one such trip that Carroll told Alice the story that would later become Alice's Adventures in Wonderland.
Carroll did have a vivid imagination and was known for his interest in dreams, wordplay, and the exploration of the nonsensical. However, there is no indication that his hallucinations played a direct role in the development of Alice in Wonderland.