Turn on all three cheats
testingcheatsenabled true
buydebug
restrictbuildbuyinbuildings off
Then move some of the markers around just a little bit. What happened is that you had placed these markers, and then maybe added or moved a wall. By moving the markers around, this will reset the game into knowing what is your sim's living space. Also make sure there is not a public room marker inside their apartment. This can cause that problem as well.
Don't forget to turn all those cheats off after you are done, but before you go back into play mode.