A former congressional aide and his roommate, whose nude bodies were found Thursday night in the bedroom of their Capitol Hill town house, died of asphyxiation after they had been left bound and gagged, D.C. police said yesterday.

Homicide investigators said that the house had been ransacked and that robbery or burglary was the suspected motive in the deaths. Police said yesterday they had not determined whether the deaths were intentional, but were handling the case as if it were a double murder.

Dr. Stuart Dawson, an assistant D.C. medical examiner, said yesterday that the men had been dead about 12 hours when their bodies were found at 9:30 p.m. in a bedroom of the men's fashionable home at 1004 Massachussetts Ave. NE, near Lincoln Park.

"Their deaths were due to upper airway obstruction largely caused by the gags and pillow cases over their heads," Dawson said. Police said that the men were found with their feet and hands bound, their mouths gagged and their heads covered with pillow cases.

Police said that they have no suspects in the case.

The victims were identified as Fred M. York Jr., 37, a former administrative assistant to Rep. Andy Ireland (D-Fla.), and Robert G. Richley, 31. They were pronounced dead at 10:30 p.m., after their bodies were discovered by a neighbor who told police that he became suspicious when he had been unable to contact the men all day following their request to borrow a lawnmower.

Police said that Richley, of Philadelphia, had only recently come to Washington and was unemployed. York, a native of Florida, had worked on Capitol Hill since 1971 when he came to Washington to work for Rep. Bill Chappell (D-Fla.). From 1976 to 1980, he worked as a senior staff assistant to Rep. Elliott Levitas (D-Ga.). From 1980 until last November he was the administrative aide to Ireland. Since then he had headed his own political consulting firm, Fred York and Associates.

In a statement released yesterday, Levitas said: "We were shocked to learn of the horrible and tragic death of Fred York . . . He had many good friends on Capitol Hill."