In his fascinating book Sea Monsters on Medieval and Renaissance Maps, Chet Van Duzer  gives a quote from Konungs skuggsjá (King’s Mirror), a mid-thirteenth century Old Norse book:
There is a fish not yet mentioned which it is scarcely advisable to speak about on account of its size, which to most men will seem incredible. There are, moreover, but very few who can tell anything definite about it, inasmuch as it is rarely seen by men; for it almost never approaches the shore or appears where fishermen can see it, and I doubt that this sort of fish is very plentiful in the sea. In our language it is usually called the “kraken”.. .. It is said, that when these fishes want something to eat, they are in the habit of giving forth a violent belch, which brings up so much food that all sorts of fish in the neighbourhood, both large and small, will rush up in the hope of getting nourishment and good fare. Meanwhile the monster keeps its mouth open, and inasmuch as its opening is about as wide as a sound or fjord, the fishes cannot help crowding in great numbers. But as soon as its mouth and belly are full, the monster closes its mouth and thus catches and shuts in all the fishes that just previously had rushed in eagerly to seek food.
This account puzzled me at first and then I realised it was probably a description of a behaviour shown by humpback whales that exhale streams of bubbles while swimming 3-5 m under the surface of the sea  to panic fish. Bubbles released as the whale swims in a tight circle cause the prey to become concentrated as the fish swim away from the disturbance in the water that is now partially surrounding them, creating a “bait ball”. The whale then lunges up through the mass of fish and, breaking the surface, closes its mouth to allow the release of water through the baleen plates . This results in the capture of much larger numbers of prey than would be possible if humpbacks used the more linear feeding method used by other baleen whales, swimming through shoals at the water surface without lunging or producing bubbles.
Humpback whales also use “bubble netting” to operate in groups, with the advantage that more fish are caught per individual than would be the case should the whales feed singly. It is thus of advantage to all individuals that partake, not only those that are closely related, and produces a larger, greater concentration of prey. Wiley et al.  monitored this group behaviour:
..humpback whales capture prey by engaging in complex feeding manoeuvres that are often accompanied by the apparently directed use of air bubbles.. .. Bubble use by humpback whales has been observed in many of their feeding habitats and is reported to occur in a variety of configurations. These bubble-feeding behaviours appear to vary in nature among both individuals and regions; for example, bubble clouds (the production of a single or multiple bursts of seltzer-sized bubbles) are commonly observed from humpback whales in the Gulf of Maine, but never in Alaskan waters.
Such differences point to behaviours learned by individuals in geographically-separated sub-populations, with groups of whales using two approaches to bubble netting - “upward spirals” and “double loops” . The effect is the same - a bubble corral around very large numbers of fish - and the manoeuvrability required results from the large tail fluke and the high aspect ratio flippers (see below), that allow short turning circles and bursts of rapid movement to the surface. The evolution of form in humpback whales thus made bubble netting possible.
It is spectacular for human whale watchers (see the video clip below), as is feeding by individuals, and one can imagine the awe of thirteenth century explorers in their very small craft watching a kraken belching. As to the appearance of the kraken, we know that it was very large, but not with a mouth as wide as a sound or fjord. Clearly the observation of humpback whales resulted in descriptive stories that became elaborated with telling and the addition of some rich Nordic mythology.
 Chet Van Duzer (2013) Sea Monsters on Medieval and Renaissance Maps. London, The British Library.
 J.H.W.Hain, G.R.Carter, S.D.Kraus, C.A.Mayo and H.E.Winn (1982) Feeding behavior of the humpback whale, Megaptera novoaeangliae, in the Western North Atlantic. Fishery Bulletin 80: 259-268
 D.Wiley, C.Ware, A.Bocconcelli, D.Cholewiak, A.Friedlaender, M.Thompson and M. Weinrich (2011) Underwater components of humpback whale bubble-net feeding behaviour. Behaviour 148: 575-602.