The last monarch to spend a night in the palace was Charles I, in 1633.
Charles I stayed in the palace in 1633.