There's no 'supposed to' about it; if that's how you feel most comfortable, it's fine. Personally I think I'd find it very uncomfortable.
I'm very concerned to see people repeating the nonsense that sleeping in a bra increases your risk of or causes breast cancer
. This is crap.
Breast cancer, like all other cancers, happens when normal cells change so that they grow in an uncontrolled way. This uncontrolled growth causes a tumour to form. No item of underwear can trigger this process, no matter how long it's worn for or whether the wearer is asleep or awake.
There are a number of urban myths concerning breast cancer and bras, and they're all nonsense - .you can't get breast cancer by wearing a badly-fitting bra either, or an underwired bra or any kind of bra at all.