It sounds like a dream — but a Hamptons resident recently woke up in the middle of the night and ambled downstairs to find Alicia Keys partying in her kitchen.

The anonymous woman on Flying Point Road in Water Mill — home to Jason Kidd as well as last year’s Hampton Designer Showhouse — heard partying going on at her palatial home in the middle of the night. When the bleary-eyed resident headed downstairs to investigate what the commotion was, she found Keys, Swizz Beatz and a party posse in her kitchen.

Sources close to Keys confirmed that the “Empire State of Mind” singer and her hip-hop producer hubby rented a home in swanky Water Mill at the end of the summer — but that the couple and their friends accidentally went into the wrong house on Flying Point Road late one night. “They were confused and accidentally entered the wrong house,” a source said.

A Hamptons insider explained: “There was a woman upstairs in the bedroom at the house, and she heard noises downstairs. The woman’s daughter, a recent college grad, and her friends had been ‘pregaming’ earlier in the night before going out, so she assumed that the noise was that they’d all returned home.”

Instead she found “a number of strangers, men and women, in her kitchen. She was startled.”

Upon closer inspection, the sleepy woman realized her kitchen resembled a late-night VIP area. “At first she was a little freaked out, but it turned out it was Swizz and Alicia and their entourage. They’d rented a house nearby.”

Luckily, all parties saw the humor in the mishap, and the woman’s daughter was delighted to later learn about the error.

Further famous residents on Flying Point Road have included supermodel and Hamptons fixture Christie Brinkley.