Midaq Alley takes place between two Egyptian revolutions, both of which sought freedom from the British. The first was in 1919, and the second in 1952. Though the novel is not explicitly political, these ideas of freedom and subservience serve as backdrop and symbol for much of the action.
As such, it is useful to think of the novel in a larger context, particularly in terms of the 2011 revolution, in which millions of Egyptians came together to protest the regime of Egyptian President Hosni Mubarak. Their concerns were over a lack of freedom of speech, high unemployment, and the injustices caused by a militarized government. The revolution was swift and effective. This revolution inspired a wave of similar demonstrations in other Arab countries including Tunisia, Yemen, Jordan, Bahrain, Syria and Libya. Overall, this wave of revolution was known as the 'Arab Spring.'
However, the Egyptian situation was not immediately solved. Power stood in the hands of a military junta that suspended the constitution for six months until elections could be organized The protests continued, and even increased in scale. Several candidates were disqualified from the elections, which led to another wave of protests in April 2012. In June 2012, Islamist and leading Muslim Brotherhood figure Mohammed Morsi was elected the 5th President of Egypt.
It is useful to consider how Mahfouz, a writer who dedicated his career to his country, was influenced by its decades-long struggle for independence, and the way that those historical themes continue to resonate today. An interesting article on the aftermath of the Arab Spring and Egypt's future can be found here: http://www.economist.com/node/21557339