We've most of us been through this as parents, and we may have forgotten, but we probably did it as children. It happened to me and by fuck it was a grind. Went on and on for months, and it was every single night, several times a night, without fail. I was not at the time one of these people who can get back to sleep in a jiffy. Far from it. He is an only child and to this day he is absolutely the apple of my eye (he's now 37, bless him, an adorable child who charmed the birds off the trees, and a great guy as an adult!), but I'm not ashamed to say that there were times during that period when I hated him.
Child psychoanalysts believe that it is round about 2 or so that they suddenly wake up to the fact that you can abandon them (prior to that, they sort of think they're God, and that their needs summon you magically). So it's an anxiety period that most of us go through, that may very well correspond to dreams that they're having about that very eventuality (i.e. just waking up one day and finding that both of you are gone forever).
That said, I have no easy answer about what you actually do about it. This is no more than my conviction about this, and about parenting in general: you've got to walk the fine line between folding immediately and always, and being Hitler. At both extremes I believe you can do damage, not only to the child, but to the adult that that child becomes.