Yes, it's generally safe to take Unisom while breastfeeding.
Unisom contains doxylamine, which is an antihistamine that has sedative properties. According to research1 , antihistamines are typically considered safe for short-term use while nursing, although they can pass into breast milk in small amounts.
However, Unisom may cause drowsiness in your baby, so it's important to monitor your infant's reaction. Additionally, some studies suggest that antihistamines could potentially decrease milk supply, which is an important factor to consider.
Before starting Unisom or any new medication, it's recommended to consult with your healthcare provider.