Wireless sensor networks (WSN) are often used in the areas where the data security is very important. The cryptographic protocols developed for WSN need to be as computationally inexpensive as possible due to the energy and computational constraints of WSN. The same requirements concern also the elements of these protocols, e.g. the random number generator. In this paper we present our work on a pseudorandom number generator for wireless sensor networks. It uses a modification of the Logistic Map, which is adapted to be used in the constrained environment of the WSN. In our approach we combine a non-deterministic seed source with the deterministic function to get the pseudorandom number generator. We present the results of the tests confirming that our approach fulfils the requirements of randomness and is a candidate to be used for cryptographic purposes.