This seems to be a somewhat distorted version of a story from Gylfaginning, in which Thor, Loki and Tjalvi and Röskva travels to Útgarða-Loki, a jotun and sorceror, who presents Thor, Loki and Tjalvi with different challenges, among which is that Thor should empty a horn with mead. Thor makes an attempt, but ultimately fails. After several other failed tasks, and a night, when the travellers leave, Útgarða-Loki reveals the truth of what they have attempted, and points out how much less water there is in the ocean. He also says that he is so impressed by what especially Thor did that he never wants to have them as visitors again.