There are quite a few reasons for sinking of cakes in the middle. One of the major ones is opening the oven door for checking before the cake is cooked completely. As a result of the drop in temperature of the oven, the cake remains uncooked in the centre and as a result the top deflates and sinks. Another reason could be insufficient leavening agent.