I agree with dawnM,
just to add- he might have stomach colics, which are typical for children if there is problem with food they it- if you are giving him some formula which his stomach cannot tolerate, (babies often cannot tolerate cow´s milk in formula because of lactose intolerance) - he might be in pain.
If you are breastfeeding him, you might eat some food (like onions, garlic, spices) which he can feel in your milk - so the result is pain in stomach again.
When he is completely exhausted from crying, THIRST and HUNGER he falls asleep.
He needs to eat - if his problem is persisting longer then day or two, he might dehydrate ! So take him to the doctor to check him, but consider changing the food he eats - to solve his problem permanently.