If you have just painted your room with a standard chemical filled, high VOC paint, then no you should definitely not sleep in the room for a good few nights until the main bulk of the chemicals have off gassed.
Unless using low/minimal/zero VOC chemical free paints (such as our range here) we would suggest not to sleep in the room for a couple of nights. But then we also don’t recommend you use conventional paints anyway!
If the paints are marked as zero / minimal VOC, and are made without chemicals that cause issues and allergies, then it would be fine. We would always advise airing a room after painting as it’s likely to have dust and other particles in the air generally, which are always better out of the house than in! If you have a allergy or condition make sure you check ingredients before making your decision. We are not medical professionals, but we do know that using natural paints are a much safer option than standard house paints!