Not a good habit to get into UNLESS the dragon is safely in box .
I have no doubt a dragon will enjoy the cozyness, but a sleeping human (even a child) can easily roll over ontop of a dragon and it can easily suffocate under the weight the sleeping human or be very seriously injured (crushed - especially a smaller younger dragon).
Best place for your dragon to sleep overnight in is it's tank (in it's hide).
The only place my dragons have ever been allowed to sleep with me is on the lounge on my chest or tummy while we both shared an afternoon siesta.