Coca-Cola and Pepsi have caffeine and that caffeine content keeps most people awake after they drink it especially within a few hours before bedtime.
For me personally I have to avoid drinking any Coca-Cola, Pepsi or any other drinks or soda containing caffeine otherwise I'm wide awake.
But then again a friend of mine can sleep soundly after he drinks soda or any other drinks containing caffeine so it can vary from person to person but since they contain caffeine it's most likely to keep you awake instead of helping you sleep.