A dream gave Elias Howe the inspiration for his invention of the sewing machine. He dreamt that cannibals surrounded him and prepared to cook him as they waved spears. When he awoke, he remembered the spears, which had holes in the shaft and moved up and down.
https://www.newenglandhistoricalsociety.com/elias-howe-sewing-machine-inventor-gets-little-help-beatles/
https://papers.ssrn.com/sol3/papers.cfm?abstract_id=1354849