Dear A.,
Please keep in mind that you are the expert on your children. You know more about them and their needs than anyone else does.
So make sure that you know that the 5 month old has a full belly and dry pants, then as he wakes during the night, just comfort him and let him know that you are there, then go back to bed, and let him cry. It is not the easiest thing to do, but it is the wisest thing to do. You do not want to wait 9 more months to get a good night's sleep, and by the way the baby needs his sleep too. So he won't be grouchy and uncomfortable and fuss throughout the day .
Also, something that is hard to understand, but is true, when you comfort and let them cry, then you are building his confidence and character, yes. And he is learning the rules of society. The society is his home and family right now, but it is a beginning. The rule is, you stay in bed and rest and sleep at night. Mom is close by and hasn't disappeared, and she will return when I need her. You are telling him that he is alright and safe right there in his little bed.
This is a true story that I am about to tell you. When I was under 2 years old, I was in bed upstairs and it was dark with only the light from the hall was coming in my door. I was laying in my crib with my eyes open and drifting off to sleep, I guess, when suddenly I opened my eyes and saw my Dad coming in the door through the beam of light from the hall. He leaned down and talked quietly to me and patted me and left to go downstairs again. It made me feel so loved. I am so grateful for that memory, because in the years that followed I didn't get to see him much. The Depression years kept our family apart because my Dad was travelling all over the South to find work, unsuccessfully most of the time. When we did get back as a family it was the happiest time of my life. I clung to my early memory when I missed my Dad all those years. True, no kidding.
Good Luck, C. N.