While this can be done (provided any specific models' clearance requirements are maintained), please note that most electric fireplaces require a dedicated circuit, so the towel warmer should not share a circuit with the fireplace in this application.