The mattress sounds like it needs replacing (try to purchase a sprung mattress if you can afford). However, he might simply be enjoying the comfort of sleeping in your bed as it smells like you. Many babies sleep far better in with their parents, so long as it is practiced safely
More likely he smells you and thats why he slept well you think babies are cramped for the last four months in there. When they are born a baby will sleep on a flat hard surface with no complaints cause they are used to pressure a matress will not make a difference maybe there is a flow of air that disturbes him. If your worried turn the matress nightly though he is just adjusting to his body changing all babies go through this even the really good ones..
If your noticing wear on the mattress definately replace it
He's more relaxed in your bed because it smells like you. Try putting something of yours in his crib.
If his mattress is showing wear and sinking in the I would say it is time for a new one.