never seldom take an indefinite article (a or an) before them (refer this)
- Have a sound sleep.
'Sleep' is enclosed with 'sound'.
- He has a great sense of humour. (Not "He as a humour")
'Humour' is enclosed with 'sense'; sense is countable ('great' is an adjective to describe 'sense'). "A sense of humour" is also acceptable.
- A bowl of rice
- A lot of homework
- A piece of clothing
- A clump of cotton
- An ounce of toothpaste
Indefinite articles can be used when enclosing noncount nouns with other articles such as an adjective or descriptors.
There are some idiomatic phrases that include noncount nouns with infinitive articles and also countable.
Three more sleeps till Christmas
This refers to the three nights that pass by.
Have a sleep
This is also acceptable in practice
Credits to Andrew Leach and Bill J for the counterexamples.