No, it's not legal to sleep in a storage unit. Laws and regulations vary from place to place, but generally, storage facilities prohibit people from living in their units. It's important to check the terms and conditions of your rental agreement to know what's allowed and what's not.