You need to be in a good place yourself (emotionally and physically) to take care of your baby.
I remember when my midwife said it during antenatal classes and this stayed with me ever since. I have found a deeper meaning to it, now being a mom. You devote your time, energy and give everything up for your baby, that's the reality of motherhood. The important thing is to know when you need a little break or some time with a good friend. Taking care of your needs will make a difference to your perception of yourself and your time with the little bundle of joy that a child is!
In all that time of taking care of your baby, remember about your well being as otherwise neither you or your baby will fully appreciate the time together. Make the most of it as 'days seem long but years go quickly'.