The LMN must be issued before you buy the device; you cannot retroactively apply an LMN to a past purchase for reimbursement.
If your LMN includes them, replacement filters and wicks are also typically eligible for HSA reimbursement. Expert Perspectives
“A Letter of Medical Necessity (LMN) from your doctor or healthcare provider is required to use FSA/HSA funds for this item.” buyFSA
“The IRS considers humidifiers “dual-purpose” items. This means they can serve both general wellness purposes and medical purposes.” Crates Health Recommended Humidifier Options