If you are covering yourself with a blanket or a sheet you are not technically naked and that is allowed. If it is for the sake of intimacy between a married couple it is allowed.
Sleeping naked without any cover is not a sin but it is not recommended. Covering your privates even when alone is highly recommended by the majority of the scholars. Staying naked without any valid reason is not advised in Islam.
Shaykh Waleed Basyouni answers and explains...
No transcription found