Yes, you can. When a cruise ship stays overnight in a port such as Bermuda, the ship essentially becomes your floating hotel. Once the ship has cleared local authorities on the first day, you are free to come and go as you wish.
The gangway remains open throughout the night, …