Yes, it's fine.
'I had a warm drink and a sleep'. You can also make longer phrases from it, such as 'I had a good night's sleep' or 'The baby had a three-hour sleep'.
I'm guessing from Mona's reply that 'have a sleep' is not a usual expression in US English, but it is certainly used elsewhere in the world.
This type of [verb] + [noun] combination, consisting of a one of a small number of simple all-purpose verbs (such as 'have', 'take' or 'go') plus a meaningful noun, is extremely common in native-speaker English.
As with 'have a sleep', we often turn the verb into a noun. Typical examples are 'have a try' or 'have a go'. In fact, anyone who wants to make their English more natural and more native-sounding should try to use these delexicalised verbs.
As a general rule, British/Australian/NZ English often uses 'have' in these phrases, while US English prefers 'take'. For example, 'have a look' / 'take a look', 'have a shower/ take a shower'.