I run a D&D campaign, and am frequently inspired by the things I see around me - but almost none of them make it into the game on a purely 1:1 basis. I take bits and pieces, shuffle and rearrange them.
Shakespeare seeing some images, and taking bits and pieces that fit the story best seems so plausible to me.
(But also, what I know about Shakespeare can probably be written down on a post-it with a sharpie, so take my opinions with whatever amount of salt required.)