Why do babies sleep ok in crib at beginning of night but not the end

My baby can sleep just fine in his sidecar crib from 7pm-4am (with several feedings in between)… but he is all over the place in the amount of sleep and feedings he requires from 4-7am ish. I never know what to expect as early morning approaches. He often only stays asleep in these hours if he’s touching me.

Any thoughts on why this is? Baby is 8 weeks old!