It was in 1946 that Egypt and Britain started negotiating Egypts independence. The first six months of the year there were numerous demonstrations by Egyptians, especially students, and on a number of occassions they were fired upon by the police, killing demonstrators. Tensions were high.
The second half the year, the British started evacuating some people out of the country, and the road to independence was set.
Alongside protecting the British civilians, the armed forces were there to protect the Suez Canal.
So he could have been rotated out there whilst he awaited demob - especially as many of the troops that already been out in the Middle East were directed to Palestine due to the increased Jewish terrorism, who were also fighting for a homeland.
The Royal Navy was also having a busy time in the Med, turning back shiploads of Jews from Europe who were trying to get to Palestine.