You can use either, I would go with a hairnet though, easier to make sure none escapes, if you use cotton, make sure you tie it on horizonally and vertically and even criss cross it too.
With either, make sure there is no slack so any fish/shrimp cant get stuck underneath it