i have to disagree with the "wulff or adams," which I assume means a species of mayfly. Mayflies do not make cocoons from which they emerge. Instead the skip the pupal stage and go from nymph to dun. Same, I believe, with stoneflies.
Your options for flying aquatic insects with a cocoon stage are caddises and those flies that devolve from hellgrammites. Caddises must be out of the equation because they cocoon underwater, usually in their cases, and then "emerge" in the pupal stage which we all fish which rises to teh surface and the adult fly stage "hatches" from.
Hellgrammites, on the other hand, pull themselves out of the water, crawl under a rock and make a cocoon on the underside of the rock where they pupate, and then hatch in the adult stage. If the boat was near water, this seems the most plausible explanation given the presence of a cocoon.
If parasitic wasps make little cocoons like that it could be one of those, but I don't think so because of the wing cases. Its gotta be something that pupates in a cocoon. Its definitely not a moth.