Newborns keep you up but an all-nighter is a stretch. Also, you're looking after your kid and trying to get them to sleep, not trying to churn out code to get something to market/go to prod.
Both of mine had colic and went through difficult teething. I've pulled all-nighters to deliver something and it's much easier than several weeks of sleepless nights with an infant.