Fussy baby

Elizabeth
My 5 month old had been taking 5-6 oz of formula at each feeding and was doing better with naps and was starting to sleep longer at night. Now out of a sudden he barely even takes 4 oz, has started barely sleeping during the day and at night wakes regularly and it's very hard to put him back to sleep! Any ideas on why out of a sudden he's taking less milk and any suggestions on how to help him sleep better?