Oh, and by the way, some people opt for a double mattress on the floor instead of a cot. This way you can lie down with them like you do it now, but they are sleeping in their own bed, by themselves. Cause it's on the floor, they can't hurt themselves when rolling out.
Some people go straight to a toddler bed with guardrail and once their bub can stand, they teach them how to climb out of the bed feet first
There are a million different ways...
Others use guardrails on their own beds or put lots of pillows on the floor surrounding the bed. They do learn pretty quickly that crawling over the edge is not a good idea.