Yes, you need a prescription to purchase a CPAP mask. The prescription ensures that you receive the appropriate mask and machine settings for your specific needs. Your doctor or sleep specialist can help you determine the best type of mask and pressure settings based on your diagnosis and sleep study results.