Enable the move_objects on code and get your Sim to "sleep". Just when he or she is about to get in bed, move the bed away from him/her. The bed will have a dent in the pillow as if the Sim were sleeping on it, however the Sim is floating in air.
Use the following trick to get your kid to float in the air for a short period of time. Get a family with as many kids as desired. Have one of them wash their hands. When the stool appears and they are standing on it, pause game play. Enable the move_objects on code, then go to buy mode. Delete the stool, then go to live mode. The Sim will be washing his hands in the air.