Can I get colds if I sleep even though my hair is still wet from bath?

No. A cold is caused from a virus which you get from being around another person with the cold virus. You cannot get a virus just by having wet hair or sleeping with wet hair.