Faced with the prospect of declining high school enrollments during the next five years, Montgomery County School Superintendent Wilmer Cody yesterday recommended merging Walter Johnson and Woodward high schools in Bethesda.

Under Cody's proposal, all Woodward High School students would attend Walter Johnson High School in Bethesda by 1988, when Woodward would be converted to a middle school for seventh and eighth grades.

His plan also would extend the attendance boundaries of Richard Montgomery High School in Rockville to include several future housing developments bounded by I-270 on the east and Rte. 28 on the south. Officials hope the boundary changes will eventually add 200 students to Richard Montgomery.

Cody's recommendations, to be the subject of public hearings Nov. 12 and 13, are contained in a study of all schools in an area that includes Bethesda, Chevy Chase, Potomac and Rockville. The school board must approve the changes.

The study shows that enrollment at Richard Montgomery High School, Woodward and Walter Johnson will decline during the next five years and then slowly begin climbing again about 1995.

There are 1,019 students at Walter Johnson High School this year, but school officials predict enrollment will drop to 795 by 1990. Woodward has 955 students this fall. That number is expected to decline to 792 in 1990. If the two schools are merged, there will be 2,070 students at Walter Johnson High School by the year 2000.

Walter Johnson has room for only 1,625 students. Cody said he hopes to accommodate the excess enrollment by building an addition to the school.

At a news conference yesterday, Cody said he has discarded an alternative plan to sell Walter Johnson High School and use the money to enlarge Woodward High School. He said rezoning would be a problem for any potential buyer.

Dan Case, a former president of the Woodward Parent-Teachers Association said Cody's proposal is "a short-term solution." Case said he believes the school system will have to reopen Woodward as a high school when enrollments begin to climb again in the late 1990s.

But Ginny Miller, a coordinator for the PTAs of lower schools that feed Walter Johnson, said Cody's plan "is the most fiscally responsible solution."

Cody's plan also would:

*Convert Tilden Intermediate School to an elementary school in 1988 when Woodward becomes a seventh and eighth grade school.

*Assign Luxmanor Elementary School students to Tilden when it becomes an elementary school. The Luxmanor building would be used for another school purpose.

*Assign Cabin John Junior High School students to Hoover Junior High School in 1987, and then reorganize Hoover into a seventh and eighth grade school when Churchill High School becomes a school for grades 9 through 12 instead of 10 through 12 in 1990.

*Reorganize Wood Junior High School as a seventh and eighth grade school when Rockville High School becomes a four-year school in 1988.

The plan also calls for adding some portable classrooms at the North Chevy Chase, Rock Creek Forest Garrett Park Farmland and Luxmanor elementary schools.