The mental institution scenes were filmed at the Northampton State Hospital, an actual asylum in Northampton, Massachusetts, which was abandoned at the time.
Following his 1996 drug arrest, Robert Downey Jr. had been clean for most of 1997, successfully completing the films Two Girls and a Guy (1997), The Gingerbread Man (1998) and U.S. Marshals (1998) without issue that year. However, when filming In Dreams during late 1997, he relapsed back into drugs, throwing his career and personal life into another period of turmoil.
The underwater sequences were actually shot in the 20th Century Fox facility in Baja, Mexico, in the the massive tank built for Titanic (1997). Production designer Nigel Phelps built a section of the town and then flooded it, allowing the filming of the town being flooded, and the sequences of divers searching it.
In filming the scenes at the Wentworth by the Sea Hotel, the crew had to make the exterior landscaping look like it hadn't been touched in many years. In actuality, although the hotel itself was not being used, the groundskeeper kept the exterior landscaping immaculate.
Filmed in 1997, copyrighted in 1998 and released in 1999.