As long as enough space is allotted for the bed to rest in the open position unencumbered, and the bed is mounted into at least 3 wall studs, there is no need to place it in the middle of the wall. Up against a wall at the corner of the room is fine, though it may be more difficult to make the bed.