Similar concept to Scherezade and the 1001 tales she told to the King, which is where the basis for Aladdin, and many of the concepts the animated series and movies are based around.
King Mamoud is played by Tahj Mowry, who played "Teddy" on FULL HOUSE, which also starred Scott Weigner, as "Steve".