While it's a beautiful and iconic landmark, it's not a hotel or a place designed for overnight stays.
However, you can stay at the Disneyland Hotel, which is located right across from the castle and offers beautiful views of it!