Only acidic compounds react with sodium metal
Acetic acid, phenol and alcohol show acidic character, hence they react with sodium metal while ether is not acidic in nature, hence it does react with sodium metal
$\underset{\text{ethanol}}{{2CH_{3}COOH}}+2Na \to \underset{\text{sodium ethoxide}}{{2CH_{3}COONa}}+H_{2}$
$\underset{\text{acetic acid}}{{2CH_{3}COOH}}+2Na \to \underset{\text{sodium acetate}}{{2CH_{3}COONa}}+H_{2}$
$\underset{\text{Phenol}}{{2C_{6}H_{5}OH}}+2Na \to \underset{\text{sodium
phenoxide}}{{2C_{6}H_{5}ONa}}+H_{2}$
$CH_{3} — O — CH_{3} + Na \to$ No reaction