Walaykum Asalam waRahamatu Allah Brother,
Thank you so much for sending your question and for wanting to increase in knowledge and righteous actions.
With regards to your question:
Abu Sa’id Al-Khudri (May Allah be pleased with him) said:
The Messenger of Allah (peace be upon him) said, “A man must not look at a man’s private parts nor must a woman look at a woman’s private parts; neither should two men lie naked under one cover, nor should two women lie naked under the same cover.” (Muslim).
In another narration by ‘Abdur-Rahman bin Abi Sa’eed [Al-Khudri] from his father, who said:
The Messenger of Allah (peace be upon him) said: ‘A man is not to look at the ‘Awrah of a man, and a woman is not to look at the ‘Awrah of a woman. A man is not to be alone with a man under one garment [sheet], and a woman is not to be alone with a woman under one garment.’ (Jami` at-Tirmidhi)
So, yes, there is a prohibition for two men to sleep in the same bed, under the same cover without barrier. It is best for them to sleep in separate beds.
In the hadith Narrated Abdullah ibn Amr ibn al-‘As:
The Messenger of Allah (peace upon him) said: Command your children to pray when they become seven years old, and beat them for it (prayer) when they become ten years old; and arrange their beds (to sleep) separately. (Sunan Abi Dawud 495)
If you wish to send more specific queries to the scholar to get an exact answer pertaining to your case, please contact Ask The Scholar.
Please continue feeding your curiosity, and find more info in the following links: