My lo sleeps through the night and honestly, I have no idea why. There, unfortunately, are no tricks or tools to get them to sleep that long. Every baby is different and have different sleep schedules. Some babies sleep through at only a few Weeks, some need one feed a night and some are up every two hours for a year or two. My lo changes her sleep pattern regularly too...she went from sleeping 12am to 9 with multiple nighttime feeds, to only needing one, slowly she would go to bed earlier on her own and now, at almost five mos,, she sleeps from about 7-8 until 7:45am with no waking. We have just let her do get thing and this was her result. Now, she just had her four month needles and woke up once last night again, so that may be the end of sleeping through the night. Also have to consider sleep regressions, growth spurts, teething and wonder Weeks which all effect sleep. we have been super lucky that our lo is such a great sleeper but really babies are not programmed to sleep that long...no idea why some do!
Oh and our lo is not on solids yet as she's not six months! Food doesn't generally have alot to do with sleep though...many parents try feeding cereal at night or extra formula but if your baby is going to wake up there's not alot you can do about it.