Yes, there are things to do. Maine coons have long or semi-long hair and there's three layers of it. Regular grooming done by you helps a long way in reducing the amount of hair the cat swallows when it grooms itself.
The cat grooms itself anyway, so there will be hair swallowed even if you try to keep loose hair at minimum. However, small amounts of hair can travel through the cat's intestines, which is usually harmless, but may create another problem; blocked bowels. There is special food sold in pet stores, that you can mix in with the regular food, designed to help with keeping the cat's intestines free of hair blocks. The food contains high amount of fiber and it works by increasing the volume of feces going through while making it softer as well. I have to say this special food is not my personal favourite, though it seems to work as designed.
So, we can't totally prevent a cat from swallowing hair. Swallowed hair is more safe to come out vomited than pooped. One way to help a cat vomit is to grow fresh grass for the cat to eat. Outdoors cats usually find enough vomitable stuff during their out time, but for indoors cats you should have a small growth of grass available, your cat will eat it as much or little as the cat likes. Pet stores usually sell both seeds and ready planted boxes that only need watering. I prefer buying seeds and growing the grass myself, for no other reason but for fun.
All's well then? What if your cat is losing a lot more hair than is normal? There could be a skin issue, or parasites inside or outside the cat, or a food allergy making your cat lose hair that ends up swallowed and then vomited. Losing hair is normal, but losing a lot of hair is a sign that the cat is not in full health. If unsure whether it is normal or not, you should take the cat to a vet for check-up.