U.S. Senators must be residents of the state they represent, but the Constitution does not require them to live in Washington, D.C. Each state sets its own residency rules; some require a period of residency before election, others have no such requirement.
Most Senators do live in D.C. for convenience, proximity to the Capitol, and family reasons. A few historical exceptions (e.g., Hiram Johnson, Barry Goldwater) maintained primary residences in their home states. Senators in D.C. may live in apartments, townhouses, single‑family homes, or the Senate Office Buildings, which offer amenities but can be expensive.