We report ISO-LWS far infrared observations of CO , water and oxygen lines towards the protobinary system IRAS4 in the NGC1333 cloud . We detected several water , OH , CO rotational lines , and two [ OI ] and [ CII ] fine structure lines . Given the relatively poor spectral and spatial resolution of these observations , assessing the origin of the observed emission is not straightforward . In this paper , we focus on the water line emission and explore the hypothesis that it originates in the envelopes that surround the two protostars , IRAS4 A and B , thanks to an accurate model . The model reproduces quite well the observed water line fluxes , predicting a density profile , mass accretion rate , central mass , and water abundance profile in agreement with previous works . We hence conclude that the emission from the envelopes is a viable explanation for the observed water emission , although we can not totally rule out the alternative that the observed water emission originates in the outflow . The envelopes are formed by a static envelope where the density follows the r ^ { -2 } law , at r \geq 1500 AU , and a collapsing envelope where the density follows the r ^ { -3 / 2 } law . The density of the envelopes at 1500 AU from the center is \sim 4 \times 10 ^ { 6 } cm ^ { -3 } and the dust temperature is \sim 30 K , i.e . about the evaporation temperature of CO-rich ices . This may explain previous observations that claimed a factor of 10 depletion of CO in IRAS4 , as those observations probe the outer \leq 30 K region of the envelope . The water is \sim 5 \times 10 ^ { -7 } less abundant than H _ { 2 } in the outer and cold envelope , whereas its abundance jumps to \sim 5 \times 10 ^ { -6 } in the innermost warm region , at r \leq 80 AU where the dust temperature exceeds 100 K , the evaporation temperature of H _ { 2 } O-rich ices . We derive a mass of 0.5 { M } _ { \sun } for each protostar , and an accretion rate of 5 \times 10 ^ { -5 } { M } _ { \sun } { yr } ^ { -1 } , implying an age of about 10000 years , if the accretion rate remains constant . We finally discuss the difference between IRAS4 and IRAS16293-2422 , where a similar analysis has been carried out . We found that IRAS4 is probably a younger system than IRAS16293-2422 . This fact , coupled with the larger distance of IRAS4 from the Sun , fully explains the apparent difference in the molecular emission of these two sources , which is much richer in IRAS16293-2422 .