Obligation: Must, have to, have got to

They must sleep. 

Basically, must, have to and have got to have the same meanings. Must is more formal, have to can be used when we write and when we speak and have got to is usually used in spoken English.

Positive sentences

Present Past
They must sleep. 
They have to sleep. 
They‘ve got to sleep.
They had to sleep. 
They had to sleep. 
They had to sleep.

Negative sentences

Present Past
They mustn’t sleep.
They don’t have to sleep.
They haven’t got to sleep.
They shouldn’t have slept.
They didn’t have to sleep.
They didn’t have to sleep.

Mustn’t and don’t have to and haven’t got to have different meanings:

Mustn’t means that something is prohibited, it isn’t allowed.

Examples

You mustn’t drink and drive.
They mustn’t go too near to the fire.
We mustn’t swim there. It’s too dangerous.

Don’t have to and haven’t got to mean that it isn’t necessary. You can do it if you want to, but you are not obliged to do it.

Examples

You don’t have to pay to go on the beach.
She doesn’t have to do the exam. She’s already passed.
They haven’t got to go to school tomorrow. It’s a bank holiday.