Providing cot or bed playtime just after a sleep when your child is fresh, allows your child to become familiar with his or her sleep space, and comfortable with being alone there. You may need to stay in the room initially, then leave briefly to get things, then spend longer and longer out of the room while your child plays.
Some people would argue that by giving your child playtime you prevent the association between the sleep-space and sleep, by including associations between the sleep-space and play. This is a valid argument. You can take some steps to make cot or bed sleep-time, and play-time distinct. Firstly, give a very distinct cue for the end of a sleep period. For example, I sing a good morning song and open the blinds. Secondly, provide toys for playtime, but only a single attachment object (once this is no longer a suffocation hazard) during sleep-time. Thirdly, you can encourage a different position for playtime (such as sitting), and remove any wraps or sleeping bags. You can also use sleep sounds to signal sleep time (sleep cues).
If, despite this, your child gets used to playing in his or her cot or bed before sleep, in my opinion, this is not so bad.
Cot playtime is a recommendation made by the Dream Baby Guide. You can check out a summary here: https://www.practicalresearchparenting.com/2014/10/10/dream-baby-guide-review/
Please add your experiences with this approach in the comments below. Let us know how long you tried it it for. Please provide the age of your child when you tried it. If it worked, please share the effects you saw. If it didn’t work, why do you think it didn’t work in your case?