There are several causes for bread to collapse or cave in (sunken top):

FIRST CAUSES:
  1. Too much yeast
  2. Liquids are present
  3. There is not enough flour
  4. Temperature of the liquids is not correct
RECOMMENDATION:
When correct salt and sugar amounts are used, a small increase of these two ingredients may be a remedy. Or, try reducing the water called for by 1/4 to 4 tablespoons.

SECOND CAUSES:
  1. High humidity or high temperatures are present
RECOMMENDATION:
At such time, add 1 to 2 tablespoons flour or decrease the liquid. A quick-rise yeast may have been used.

TIP:
Too much yeast will cause the loaf to have a course, open grain and a flattened or sunken top.