In The Sims Medieval, there is no standard “free play” mode, but there is a never ending “quest” toward the end that you can unlock to do a typical free play. You can either progress far enough in the game to get there, or use this cheat.
To use unlock the Free Play quest using a cheat, hit Ctrl+Shift+C to open the cheats console. Type in showallquests and hit enter.
This unlocks all quests, including the Free Play quest, and also lets you repeat previous quests as many times as you want.