I assume you're asking about a sleep eye mask and not a CPAP mask?
A sleep mask can last nearly forever and there's really no need to replace the sleep mask that goes on your eyes at night.
However you should wash the eye sleep mask every few months or so to keep it clean and sanitary.
I hand wash my eye sleep mask ever few months and then hang it out to dry.
You could put it in the dryer but I like to dry it outside when I can.
As for a CPAP sleep mask those should be cleaned at least once per week or sooner and replaced every 6 months to a year or when the CPAP mask does not seal anymore properly.
But eye sleep masks can last for a long time and don't need replaced as often or at all.