The thing about 1001 Nights is the ending, where Sherzhade gets to keep her head. Would you really like to be married to a man who kept beheading wives on the first day of the honeymoon?
Mahfouz seems to be playing with this idea and some others in this quasi sequel to Arabian Nights. In part, he explores why a sultan can do something and an everyman cannot. He deals with the question of faith and how stories and telling change our view of that.
This novel is more like a series of inter-connected short stories where characters and character types from the Nights play out. The stories are more locally focused and a little less adventuress than some of the tales in the Nights, but it is a deep and quiet book.