Giraffes can bend their knees, and they do so sometimes when drinking or lying down to sleep. When drinking, giraffes either bend the knees of their forelegs or splay their forelegs so that they can reach the water.
To sleep, a giraffe sometimes folds his legs beneath his body. He accomplishes this by kneeling on his front knees and lowering his body. To rise from this position, the giraffe gets on his front knees, spreads his back legs, raises his hindquarters and straightens his back legs. Because getting up and down is rather difficult for giraffes and increases their vulnerability to attack, they often sleep while standing.