It is mentioned in Genesis 9:21-33 that Noah uncovered his body and slept in his tent. During this time, his son Ham saw this and reported it to his brothers. In order to cover his nakedness, his sons covered him with a garment. Upon waking up, Noah realised what had happened and cursed his grandson for his father doing such a thing.
It may also be noted that Noah did not curse his son, instead he cursed Ham's son. The reason is that since Ham accompanied Noah in the ark, he was blessed ...